({ ssrTheme }: { ssrTheme: boolean })
| 95 | `; |
| 96 | |
| 97 | export function NonFlashOfWrongThemeEls({ ssrTheme }: { ssrTheme: boolean }) { |
| 98 | return ( |
| 99 | <> |
| 100 | {ssrTheme ? null : ( |
| 101 | <script dangerouslySetInnerHTML={{ __html: clientThemeCode }} /> |
| 102 | )} |
| 103 | </> |
| 104 | ); |
| 105 | } |
| 106 | |
| 107 | export function isTheme(value: unknown): value is Theme { |
| 108 | return typeof value === "string" && ["light", "dark"].includes(value); |
nothing calls this directly
no outgoing calls
no test coverage detected