Skip to content

Commit 7f3f409

Browse files
committed
Rename SafeHydrate -> ClientRender; remove inaccurate comment
1 parent 086d533 commit 7f3f409

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

site/pages/_app.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ const Contents: React.FC<AppProps> = ({ Component, pageProps }) => {
4141
}
4242

4343
/**
44-
* SafeHydrate is a component that only allows its children to be rendered
44+
* ClientRender is a component that only allows its children to be rendered
4545
* client-side. This check is performed by querying the existence of the window
4646
* global.
4747
*/
48-
const SafeHydrate: React.FC = ({ children }) => (
48+
const ClientRender: React.FC = ({ children }) => (
4949
<div suppressHydrationWarning>{typeof window === "undefined" ? null : children}</div>
5050
)
5151

@@ -55,12 +55,12 @@ const SafeHydrate: React.FC = ({ children }) => (
5555
*/
5656
const MyApp: React.FC<AppProps> = (appProps) => {
5757
return (
58-
<SafeHydrate>
58+
<ClientRender>
5959
<ThemeProvider theme={dark}>
6060
<CssBaseline />
6161
<Contents {...appProps} />
6262
</ThemeProvider>
63-
</SafeHydrate>
63+
</ClientRender>
6464
)
6565
}
6666

site/pages/_document.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ class MyDocument extends Document {
1212
return (
1313
<Html>
1414
<Head>
15-
{/* Meta tags */}
1615
<meta charSet="utf-8" />
1716
<meta name="theme-color" content="#17172E" />
1817
<meta name="application-name" content="Coder" />

0 commit comments

Comments
 (0)