refactor(collection/presentation): apply review suggestions

This commit is contained in:
Elian Doran
2025-10-16 09:02:02 +03:00
parent 90e5193a97
commit 96f5b55d9f
3 changed files with 14 additions and 21 deletions

View File

@@ -13,10 +13,10 @@ export default function ShadowDom({ children, containerRef: externalContainerRef
// Create the shadow root.
useEffect(() => {
if (!containerRef.current || shadowRoot) return;
if (!containerRef.current) return;
const shadow = containerRef.current.attachShadow({ mode: "open" });
setShadowRoot(shadow);
}, [ shadowRoot ]);
}, []);
// Render the child elements.
useEffect(() => {