-
- {result?.data?.data?.logo?.url ? (
-
- ) : (
-
- {result?.data?.data?.title}
-
- )}
-
+
{result.loading ? null : logo}
diff --git a/packages/core/client/src/system-settings/SystemSettingsProvider.tsx b/packages/core/client/src/system-settings/SystemSettingsProvider.tsx
index b64e158771..64492e480f 100644
--- a/packages/core/client/src/system-settings/SystemSettingsProvider.tsx
+++ b/packages/core/client/src/system-settings/SystemSettingsProvider.tsx
@@ -10,7 +10,6 @@
import { Result } from 'ahooks/es/useRequest/src/types';
import React, { createContext, ReactNode, useContext } from 'react';
import { useRequest } from '../api-client';
-import { useAppSpin } from '../application/hooks/useAppSpin';
export const SystemSettingsContext = createContext>(null);
SystemSettingsContext.displayName = 'SystemSettingsContext';
@@ -20,13 +19,9 @@ export const useSystemSettings = () => {
};
export const SystemSettingsProvider: React.FC<{ children?: ReactNode }> = (props) => {
- const { render } = useAppSpin();
const result = useRequest({
url: 'systemSettings:get/1?appends=logo',
});
- if (result.loading) {
- return render();
- }
return {props.children};
};
diff --git a/packages/core/client/src/system-settings/SystemSettingsShortcut.tsx b/packages/core/client/src/system-settings/SystemSettingsShortcut.tsx
index c97703007e..35a2348062 100644
--- a/packages/core/client/src/system-settings/SystemSettingsShortcut.tsx
+++ b/packages/core/client/src/system-settings/SystemSettingsShortcut.tsx
@@ -39,7 +39,7 @@ const useSystemSettingsValues = (options) => {
const result = useSystemSettings();
return useRequest(() => Promise.resolve(result.data), {
...options,
- refreshDeps: [visible],
+ refreshDeps: [visible, result.data],
});
};