From 7286aebe8f2c862bf9d94e16efbb61097c801d1d Mon Sep 17 00:00:00 2001 From: Shen Lu Date: Mon, 26 Feb 2024 18:22:32 +0800 Subject: [PATCH] Update Giscus.tsx Revert to old explicit `return null`. --- react/src/lib/Giscus.tsx | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/react/src/lib/Giscus.tsx b/react/src/lib/Giscus.tsx index 6ae64fe9..6a95d762 100644 --- a/react/src/lib/Giscus.tsx +++ b/react/src/lib/Giscus.tsx @@ -25,27 +25,25 @@ export default function Giscus({ import('giscus').then(() => setMounted(true)); }, []); + if (!mounted) return null; + return ( - <> - {mounted && ( - - )} - + ); }