Skip to content

Commit

Permalink
fix: fix portal component ts issue
Browse files Browse the repository at this point in the history
  • Loading branch information
swiiny committed Jan 1, 2024
1 parent fd23338 commit 3c2dfe5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { FC, useEffect, useRef, useState } from 'react';
import { FC, PropsWithChildren, useEffect, useRef, useState } from 'react';
import { createPortal } from 'react-dom';
import { IPortal } from './Portal.type';

// client only portal
const Portal: FC<IPortal> = ({ children, selector }) => {
const Portal: FC<PropsWithChildren<IPortal>> = ({ children, selector }) => {
const ref = useRef<any | undefined>();
const [mounted, setMounted] = useState<boolean>(false);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import { ReactNode } from 'react';

interface IPortal {
children: ReactNode;
selector: string;
}

Expand Down

0 comments on commit 3c2dfe5

Please sign in to comment.