Fix React modal error.
This commit is contained in:
parent
b3038c6ab5
commit
c16af23f21
1 changed files with 5 additions and 0 deletions
|
@ -42,6 +42,7 @@ import { OptionsMenu } from "../optionsMenu";
|
|||
import { WelcomeModal } from "./WelcomeModal";
|
||||
import { PisModal } from "./PISModal";
|
||||
import "./channel.scss";
|
||||
import Modal from "react-modal";
|
||||
|
||||
function Channel({ id, data }: { id: number; data: PlanItem[] }) {
|
||||
return (
|
||||
|
@ -196,6 +197,10 @@ const Showplanner: React.FC<{ timeslotId: number }> = function({ timeslotId }) {
|
|||
planSaveError,
|
||||
planSaving,
|
||||
} = useSelector((state: RootState) => state.showplan);
|
||||
|
||||
// Tell Modals that #root is the main page content, for accessability reasons.
|
||||
Modal.setAppElement('#root');
|
||||
|
||||
const session = useSelector((state: RootState) => state.session);
|
||||
|
||||
const [showWelcomeModal, setShowWelcomeModal] = useState(
|
||||
|
|
Loading…
Reference in a new issue