From 3ae4dfcc8296fc8b24085e3c495e5ffe397e9ced Mon Sep 17 00:00:00 2001 From: Emma Date: Tue, 12 Mar 2024 05:50:29 -0600 Subject: [PATCH] fixes the portal that I "fixed" before --- lib/portal/components/index.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/portal/components/index.ts b/lib/portal/components/index.ts index 7b297d8..5d5690a 100644 --- a/lib/portal/components/index.ts +++ b/lib/portal/components/index.ts @@ -1,5 +1,3 @@ -"use client"; - import { FC, PropsWithChildren, useEffect, useState } from "react"; import { createPortal } from "react-dom"; @@ -14,7 +12,7 @@ export const Portal: FC> = ( const [container] = useState(() => { // This will be executed only on the initial render // https://reactjs.org/docs/hooks-reference.html#lazy-initial-state - return document.getElementById("root-portal") || document.createElement(el); + return document.createElement(el); }); // todo: this smells. appending the same element?