Fix loader fetch data di Forum dan Forumku

### No Issue
This commit is contained in:
2025-11-28 17:27:59 +08:00
parent 33ec892ec8
commit 69452ff4e7
3 changed files with 3 additions and 4 deletions

View File

@@ -145,7 +145,7 @@ export const AuthProvider = ({ children }: { children: React.ReactNode }) => {
await AsyncStorage.setItem("userData", JSON.stringify(dataUser));
return dataUser;
} catch (error: any) {
console.log(error.response?.data?.message + "user" || "Gagal mengambil data user");
console.log("[LOAD USER DATA]",error.response?.data?.message + "user" || "Gagal mengambil data user");
} finally {
setIsLoading(false);
}

View File

@@ -203,10 +203,9 @@ export default function Forum_ViewBeranda2() {
/>
}
onEndReached={loadMore}
// ListHeaderComponent={ListHeaderComponent}
ListFooterComponent={ListFooterComponent}
ListEmptyComponent={
_.isEmpty(listData) ? <SkeletonListComponent /> : <EmptyComponent />
loading && _.isEmpty(listData) ? <SkeletonListComponent /> : <EmptyComponent />
}
// ------------------------
/>

View File

@@ -207,7 +207,7 @@ export default function View_Forumku2() {
ListHeaderComponent={randerHeaderComponent()}
ListFooterComponent={ListFooterComponent}
ListEmptyComponent={
_.isEmpty(listData) ? <SkeletonListComponent /> : <EmptyComponent />
loading && _.isEmpty(listData) ? <SkeletonListComponent /> : <EmptyComponent />
}
/>
</>