upd: division

Deskripsi:
- update load pagination

No Issues
This commit is contained in:
amel
2024-09-19 12:12:54 +08:00
parent fe5155ee37
commit c4da324ad5
3 changed files with 53 additions and 13 deletions

View File

@@ -31,13 +31,13 @@ export default function ListAnnouncement() {
setLoading(true)
const response = await funGetAllAnnouncement('?search=' + searchQuery + '&page=' + isPage)
if (response.success) {
if (response.data.length > 0) {
// if (response.data.length > 0) {
if (isPage == 1) {
setIsData(response?.data)
} else {
setIsData([...isData, ...response?.data])
}
}
// }
} else {
toast.error(response.message);
}