Fill in serverside theme when no client preference is set
This commit is contained in:
parent
969fab85ba
commit
f298775072
@ -13,7 +13,6 @@ import globalStyles from "../index.css";
|
|||||||
import {
|
import {
|
||||||
isRouteErrorResponse,
|
isRouteErrorResponse,
|
||||||
Links,
|
Links,
|
||||||
LiveReload,
|
|
||||||
Meta,
|
Meta,
|
||||||
Outlet,
|
Outlet,
|
||||||
Scripts,
|
Scripts,
|
||||||
@ -148,7 +147,9 @@ function getMarkup(
|
|||||||
<StrictMode>
|
<StrictMode>
|
||||||
<ChakraProvider
|
<ChakraProvider
|
||||||
colorModeManager={cookieStorageManagerSSR(
|
colorModeManager={cookieStorageManagerSSR(
|
||||||
typeof document === "undefined" ? "" : document.cookie
|
typeof document === "undefined"
|
||||||
|
? `chakra-ui-color-mode=${loaderData.theme}`
|
||||||
|
: document.cookie
|
||||||
)}
|
)}
|
||||||
theme={theme}
|
theme={theme}
|
||||||
>
|
>
|
||||||
@ -156,7 +157,6 @@ function getMarkup(
|
|||||||
<Navigation {...loaderData} />
|
<Navigation {...loaderData} />
|
||||||
{children}
|
{children}
|
||||||
<Scripts />
|
<Scripts />
|
||||||
<LiveReload />
|
|
||||||
</div>
|
</div>
|
||||||
</ChakraProvider>
|
</ChakraProvider>
|
||||||
</StrictMode>
|
</StrictMode>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user