From 01d59c350d70a6c09bd0e9ad065ac1bfdd1b52df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90=C3=A0o=20V=C4=83n=20H=C3=B9ng?= Date: Fri, 9 May 2025 23:33:28 +0700 Subject: [PATCH] Add multiple style tag to support client components we will have server and client components --- src/AntdRegistry.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/AntdRegistry.tsx b/src/AntdRegistry.tsx index 5c15c84..8f52232 100644 --- a/src/AntdRegistry.tsx +++ b/src/AntdRegistry.tsx @@ -9,15 +9,15 @@ type AntdRegistryProps = Omit; const AntdRegistry: FC = (props) => { const [cache] = useState(() => createCache()); - const inserted = useRef(false); + const inserted = useRef(''); useServerInsertedHTML(() => { const styleText = extractStyle(cache, { plain: true }); - if (inserted.current) { + if (inserted.current === styleText) { return null; } - inserted.current = true; + inserted.current = styleText; return (