import React from "react"; import { AnimatePresence, motion } from "framer-motion"; import { useSelector } from "react-redux"; import Overlay from "./Overlay"; function Modal({ className, children, typeValue, canOverlayClose, onClick }) { const { type, positions } = useSelector((state) => state.modalReducer); return ( {type === typeValue && ( {children} )} ); } export default Modal;