From ee5845b1013b2f4beab37253be3e4e15a0394fdf Mon Sep 17 00:00:00 2001 From: speakeloudest Date: Mon, 28 Jul 2025 05:34:52 -0700 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=88=A0=E9=99=A4=E9=A6=96=E9=A1=B5load?= =?UTF-8?q?ing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/user/components/providers.tsx | 6 +++++- apps/user/tailwind.config.ts | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/user/components/providers.tsx b/apps/user/components/providers.tsx index 957fab0..b61519f 100644 --- a/apps/user/components/providers.tsx +++ b/apps/user/components/providers.tsx @@ -5,6 +5,7 @@ import { Logout } from '@/utils/common'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { ReactQueryStreamedHydration } from '@tanstack/react-query-next-experimental'; import { ThemeProvider as NextThemesProvider } from 'next-themes'; +import { usePathname } from 'next/navigation'; import React, { useEffect, useState } from 'react'; import Loading from './loading'; @@ -31,6 +32,9 @@ export default function Providers({ ); const { setCommon, setUser } = useGlobalStore(); + const pathname = usePathname(); + const whiteList = ['/']; + const isWhite = whiteList.includes(pathname); useEffect(() => { const initializeData = async () => { @@ -63,7 +67,7 @@ export default function Providers({ - 0} /> + 0)} /> {children} diff --git a/apps/user/tailwind.config.ts b/apps/user/tailwind.config.ts index 0577764..f1cc3a1 100644 --- a/apps/user/tailwind.config.ts +++ b/apps/user/tailwind.config.ts @@ -4,5 +4,4 @@ const config = { ...baseConfig, darkMode: false, // 或 'media' 或 'class',根据你的需求覆盖 }; -console.log(config); export default config;