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?