refactor(web): remove typescript
This commit is contained in:
@@ -1,14 +1,7 @@
|
||||
import * as React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
|
||||
type PortalProps = {
|
||||
children: React.ReactElement;
|
||||
};
|
||||
|
||||
const Portal = ({ children }: PortalProps) => {
|
||||
const Portal = ({ children }) => {
|
||||
return typeof document === 'object'
|
||||
? ReactDOM.createPortal(children, document.body)
|
||||
: null;
|
||||
};
|
||||
|
||||
export default Portal;
|
Reference in New Issue
Block a user