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 {
|
||||
isRouteErrorResponse,
|
||||
Links,
|
||||
LiveReload,
|
||||
Meta,
|
||||
Outlet,
|
||||
Scripts,
|
||||
@ -148,7 +147,9 @@ function getMarkup(
|
||||
<StrictMode>
|
||||
<ChakraProvider
|
||||
colorModeManager={cookieStorageManagerSSR(
|
||||
typeof document === "undefined" ? "" : document.cookie
|
||||
typeof document === "undefined"
|
||||
? `chakra-ui-color-mode=${loaderData.theme}`
|
||||
: document.cookie
|
||||
)}
|
||||
theme={theme}
|
||||
>
|
||||
@ -156,7 +157,6 @@ function getMarkup(
|
||||
<Navigation {...loaderData} />
|
||||
{children}
|
||||
<Scripts />
|
||||
<LiveReload />
|
||||
</div>
|
||||
</ChakraProvider>
|
||||
</StrictMode>
|
||||
|
Loading…
x
Reference in New Issue
Block a user