Show missing loading placeholders

This commit is contained in:
schroda
2024-04-27 16:24:55 +02:00
parent 35b756e09c
commit 626c4ba6e6
9 changed files with 52 additions and 7 deletions

View File

@@ -23,6 +23,7 @@ import {
createUpdateMetadataServerSettings,
useMetadataServerSettings,
} from '@/lib/metadata/metadataServerSettings.ts';
import { LoadingPlaceholder } from '@/components/util/LoadingPlaceholder.tsx';
type ExtensionsSettings = Pick<GqlServerSettings, 'maxSourcesInParallel' | 'localSourcePath' | 'extensionRepos'>;
@@ -45,7 +46,7 @@ export const BrowseSettings = () => {
const [showNsfw, setShowNsfw] = useLocalStorage<boolean>('showNsfw', true);
const { data } = requestManager.useGetServerSettings();
const { data, loading } = requestManager.useGetServerSettings();
const serverSettings = data ? extractBrowseSettings(data.settings) : undefined;
const [mutateSettings] = requestManager.useUpdateServerSettings();
@@ -61,6 +62,10 @@ export const BrowseSettings = () => {
} = useMetadataServerSettings();
const updateMetadataServerSettings = createUpdateMetadataServerSettings<keyof MetadataBrowseSettings>();
if (loading) {
return <LoadingPlaceholder />;
}
return (
<List>
<ListItem>