Fix loader fetch data di Forum dan Forumku
### No Issue
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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 />
|
||||
}
|
||||
// ------------------------
|
||||
/>
|
||||
|
||||
@@ -207,7 +207,7 @@ export default function View_Forumku2() {
|
||||
ListHeaderComponent={randerHeaderComponent()}
|
||||
ListFooterComponent={ListFooterComponent}
|
||||
ListEmptyComponent={
|
||||
_.isEmpty(listData) ? <SkeletonListComponent /> : <EmptyComponent />
|
||||
loading && _.isEmpty(listData) ? <SkeletonListComponent /> : <EmptyComponent />
|
||||
}
|
||||
/>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user