0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00
logto/packages/ui/src/index.tsx
simeng-li 0270bf1be3
fix(ui): extract ReactModal elementApp and fix act warning in ut (#1756)
extract ReactModal elementApp and fix act warning in ut
2022-08-09 11:00:43 +08:00

9 lines
250 B
TypeScript

import { createRoot } from 'react-dom/client';
import ReactModal from 'react-modal';
import App from './App';
const app = document.querySelector('#app');
const root = app && createRoot(app);
ReactModal.setAppElement('#app');
root?.render(<App />);