|
@@ -19,7 +19,7 @@ import { useAppContext } from "../providers/AppContext";
|
|
|
export default function FileList() {
|
|
export default function FileList() {
|
|
|
const queryClient = useQueryClient();
|
|
const queryClient = useQueryClient();
|
|
|
const { addNotification } = useNotifications();
|
|
const { addNotification } = useNotifications();
|
|
|
- const { datasets, isLoading: isContextLoading } = useAppContext();
|
|
|
|
|
|
|
+ const { datasets } = useAppContext();
|
|
|
|
|
|
|
|
// Get files from all datasets
|
|
// Get files from all datasets
|
|
|
const {
|
|
const {
|
|
@@ -445,8 +445,8 @@ export default function FileList() {
|
|
|
|
|
|
|
|
const displayFiles = paginatedData;
|
|
const displayFiles = paginatedData;
|
|
|
|
|
|
|
|
- // Show loading state if datasets are loading, allFiles is loading, or data is undefined
|
|
|
|
|
- if (isContextLoading || isLoading || !allFiles) {
|
|
|
|
|
|
|
+ // Show loading state only if files query is loading and we don't have data yet
|
|
|
|
|
+ if (isLoading && !allFiles) {
|
|
|
return <LoadingCard message="Loading files..." />;
|
|
return <LoadingCard message="Loading files..." />;
|
|
|
}
|
|
}
|
|
|
if (error) {
|
|
if (error) {
|