Skip to content

Commit 7286aeb

Browse files
authored
Update Giscus.tsx
Revert to old explicit `return null`.
1 parent cb6a254 commit 7286aeb

File tree

1 file changed

+19
-21
lines changed

1 file changed

+19
-21
lines changed

react/src/lib/Giscus.tsx

+19-21
Original file line numberDiff line numberDiff line change
@@ -25,27 +25,25 @@ export default function Giscus({
2525
import('giscus').then(() => setMounted(true));
2626
}, []);
2727

28+
if (!mounted) return null;
29+
2830
return (
29-
<>
30-
{mounted && (
31-
<giscus-widget
32-
id={id}
33-
host={host}
34-
repo={repo}
35-
repoid={repoId}
36-
category={category}
37-
categoryid={categoryId}
38-
mapping={mapping}
39-
term={term}
40-
strict={strict}
41-
reactionsenabled={reactionsEnabled}
42-
emitmetadata={emitMetadata}
43-
inputposition={inputPosition}
44-
theme={theme}
45-
lang={lang}
46-
loading={loading}
47-
/>
48-
)}
49-
</>
31+
<giscus-widget
32+
id={id}
33+
host={host}
34+
repo={repo}
35+
repoid={repoId}
36+
category={category}
37+
categoryid={categoryId}
38+
mapping={mapping}
39+
term={term}
40+
strict={strict}
41+
reactionsenabled={reactionsEnabled}
42+
emitmetadata={emitMetadata}
43+
inputposition={inputPosition}
44+
theme={theme}
45+
lang={lang}
46+
loading={loading}
47+
/>
5048
);
5149
}

0 commit comments

Comments
 (0)