|
@@ -25,6 +25,7 @@ import { getToken as getUserToken } from "@/utils/Cookies";
|
|
|
|
|
|
import { PollingState, usePollingStore } from "@/stores/usePollingStore";
|
|
|
import { useSuspensionStore } from "@/stores/useSuspensionStore";
|
|
|
+import { useUserInfoStore } from "@/stores/useUserInfoStore";
|
|
|
import { useVipStore } from "@/stores/useVipStore";
|
|
|
import { useWalletStore } from "@/stores/useWalletStore";
|
|
|
|
|
@@ -402,12 +403,16 @@ export default function SidebarLayout({ children, themeProps }: ProvidersProps)
|
|
|
|
|
|
export const Providers = ({ children, themeProps }: ProvidersProps) => {
|
|
|
const setupConfig = useSystemStore((state) => state.setupConfig);
|
|
|
+ const getUserInfo = useUserInfoStore((state) => state.getUserInfo);
|
|
|
|
|
|
useDebounceEffect(() => {
|
|
|
if ("serviceWorker" in navigator) {
|
|
|
initFirebase();
|
|
|
}
|
|
|
|
|
|
+ if (getUserToken()) {
|
|
|
+ getUserInfo();
|
|
|
+ }
|
|
|
// 初始化配置
|
|
|
setupConfig();
|
|
|
// 初始化字体
|