update
This commit is contained in:
parent
d6482d4f60
commit
929c2368aa
|
|
@ -61,7 +61,18 @@ const Tracking = () => {
|
|||
|
||||
const getAllTracking = async () =>{
|
||||
try {
|
||||
const res = await get(getListTracking)
|
||||
const searchParams = new URLSearchParams(window.location.search)
|
||||
const params = {}
|
||||
|
||||
for (const [key, value] of searchParams.entries()) {
|
||||
if (key === 'page' && value === '') {
|
||||
Object.assign(params, { [`${key}`]: 1 })
|
||||
} else {
|
||||
Object.assign(params, { [`${key}`]: value })
|
||||
}
|
||||
}
|
||||
|
||||
const res = await get(getListTracking, params)
|
||||
if(res.status){
|
||||
setListTracking(res)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue