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;