Skip to content

Commit

Permalink
Merge pull request #1515 from ecency/bugfix/theme-switching
Browse files Browse the repository at this point in the history
Fixed theme switching in SSR
  • Loading branch information
feruzm authored Nov 16, 2023
2 parents ecf5a9a + 1e374a4 commit a515f4e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ exports[`(1) Default render 1`] = `
</div>
<div
className="editor-tool"
id="editor-tool-emoji-picker-11135353-f094-48d5-8498-99120b0b2423"
id="editor-tool-emoji-picker-a1cc9845-d2bb-4d53-b31a-443119a1fc53"
role="none"
title="Emoji"
>
Expand Down Expand Up @@ -551,7 +551,7 @@ exports[`(2) Cancellable, in progress 1`] = `
</div>
<div
className="editor-tool"
id="editor-tool-emoji-picker-41abb59c-8fb5-40fd-9dbb-e46f8bdead90"
id="editor-tool-emoji-picker-e0f444b6-152e-4fe9-9756-80bfd584c550"
role="none"
title="Emoji"
>
Expand Down
2 changes: 1 addition & 1 deletion src/server/template.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const render = (req: express.Request, state: AppState) => {
${linkTags}
${styleTags}
</head>
<body class={state.global.theme === 'night' ? 'dark' : ''} style="display: none;">
<body class="${state.global.theme === "night" ? "dark" : ""}">
<div id="root">${markup}</div>
<script>
window.__PRELOADED_STATE__ = ${serialize(finalState)}
Expand Down

0 comments on commit a515f4e

Please sign in to comment.