Skip to content

Commit

Permalink
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
12 changes: 8 additions & 4 deletions pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { Provider } from "urql";
import { urlQlient } from "../src/graphql/urql";
import { isAuthenticatedAtom } from "../src/helpers/auth";
import { GlobalStyles } from "../styles/globalStyles";
import { jsconfTheme, previaTheme } from "../styles/theme";
import { jsconfTheme, landingTheme, previaTheme } from "../styles/theme";

const WebSchema = dynamic(
async () => await import("../src/Components/schema/webpage"),
Expand Down Expand Up @@ -108,14 +108,18 @@ const AppWithQueryClients = ({
})
);

const theme =
{
"/laprevia": previaTheme,
"/": landingTheme,
}[pathname] ?? jsconfTheme;

return (
<CacheProvider value={cache}>
<Provider value={urlQlient}>
<TanstackQueryProvider client={queryClient}>
<Hydrate state={(pageProps as any).dehydratedState}>
<ThemeProvider
theme={pathname === "/laprevia" ? previaTheme : jsconfTheme}
>
<ThemeProvider theme={theme}>
<GlobalStyles />
<Suspense fallback={null}>
<WebSchema />
Expand Down
15 changes: 13 additions & 2 deletions styles/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ const theme: Theme = {
},
},
navBar: {
textColor: colors.jsconfBlack,
activeTextColor: colors.jsconfBlack,
textColor: colors.white,
activeTextColor: colors.jsconfRed,
mobileTextColor: colors.jsconfBlack,
activeMobileTextColor: colors.jsconfRed,
},
Expand All @@ -132,6 +132,17 @@ export const jsconfTheme: Theme = {
...theme,
};

export const landingTheme: Theme = {
...theme,
elements: {
...theme.elements,
navBar: {
...theme.elements.navBar,
textColor: colors.jsconfBlack,
},
},
};

export const previaTheme: Theme = {
...theme,
colors: {
Expand Down

0 comments on commit c165c4a

Please sign in to comment.