fix shortcut

This commit is contained in:
Gabe Yuan
2023-09-08 13:53:33 +08:00
parent 850dc0e83b
commit 56350de2cf
4 changed files with 44 additions and 13 deletions

View File

@@ -12,7 +12,10 @@ const SettingContext = createContext({
});
export function SettingProvider({ children }) {
const { data, update, reload } = useStorage(STOKEY_SETTING, DEFAULT_SETTING);
const { data, update, reload, loading } = useStorage(
STOKEY_SETTING,
DEFAULT_SETTING
);
const {
sync: { settingUpdateAt },
updateSync,
@@ -36,6 +39,10 @@ export function SettingProvider({ children }) {
[settingUpdateAt, update, updateSync, syncSetting]
);
if (loading) {
return;
}
return (
<SettingContext.Provider
value={{