Skip to content

Commit

Permalink
Update Giscus.tsx
Browse files Browse the repository at this point in the history
Revert to old explicit `return null`.
  • Loading branch information
shenlu89 authored Feb 26, 2024
1 parent cb6a254 commit 7286aeb
Showing 1 changed file with 19 additions and 21 deletions.
40 changes: 19 additions & 21 deletions react/src/lib/Giscus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,27 +25,25 @@ export default function Giscus({
import('giscus').then(() => setMounted(true));
}, []);

if (!mounted) return null;

return (
<>
{mounted && (
<giscus-widget
id={id}
host={host}
repo={repo}
repoid={repoId}
category={category}
categoryid={categoryId}
mapping={mapping}
term={term}
strict={strict}
reactionsenabled={reactionsEnabled}
emitmetadata={emitMetadata}
inputposition={inputPosition}
theme={theme}
lang={lang}
loading={loading}
/>
)}
</>
<giscus-widget
id={id}
host={host}
repo={repo}
repoid={repoId}
category={category}
categoryid={categoryId}
mapping={mapping}
term={term}
strict={strict}
reactionsenabled={reactionsEnabled}
emitmetadata={emitMetadata}
inputposition={inputPosition}
theme={theme}
lang={lang}
loading={loading}
/>
);
}

0 comments on commit 7286aeb

Please sign in to comment.