Skip to content

Commit

Permalink
🐛 fix: apply siteToken configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
yingpengsha committed Oct 16, 2023
1 parent e7208f1 commit 7a37f54
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/layouts/DocLayout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,23 @@ import { shallow } from 'zustand/shallow';
import Favicons from '@/components/Favicons';
import { StoreUpdater } from '@/components/StoreUpdater';
import GlobalStyle from '@/layouts/DocLayout/GlobalStyle';
import { useThemeStore } from '@/store';
import { siteSelectors, useSiteStore, useThemeStore } from '@/store';
import customToken from '@/styles/customToken';

import DocumentLayout from './DocumentLayout';

const App = memo(() => {
const themeMode = useThemeStore((st) => st.themeMode, shallow);
const userToken = useSiteStore(siteSelectors.token);

return (
<>
<Favicons />
<StoreUpdater />
<ThemeProvider customToken={customToken} themeMode={themeMode}>
<ThemeProvider
customToken={(themeToken) => Object.assign({}, customToken(themeToken), userToken)}
themeMode={themeMode}
>
<GlobalStyle />
<DocumentLayout />
</ThemeProvider>
Expand Down

0 comments on commit 7a37f54

Please sign in to comment.