diff --git a/components/modal/admin/AdminNotiAllModal.tsx b/components/modal/admin/AdminNotiAllModal.tsx index fa384e7ff..94c8eacfb 100644 --- a/components/modal/admin/AdminNotiAllModal.tsx +++ b/components/modal/admin/AdminNotiAllModal.tsx @@ -2,9 +2,20 @@ import { useSetRecoilState } from 'recoil'; import { useEffect, useState } from 'react'; import styles from 'styles/admin/modal/AdminNotiAll.module.scss'; import { modalState } from 'utils/recoil/modal'; +import * as React from 'react'; +import Stack from '@mui/material/Stack'; +import Snackbar from '@mui/material/Snackbar'; +import MuiAlert, { AlertProps } from '@mui/material/Alert'; import instance from 'utils/axios'; import { finished } from 'stream'; +const Alert = React.forwardRef(function Alert( + props, + ref +) { + return ; +}); + interface EditedAllNoti { notification: string | number; } @@ -42,20 +53,20 @@ export default function AdminNotiAllModal(props: any) { // useEffect(() => { // getBasicPenaltyHandler(); // }, []); - const finishEditHandler = () => { - let errMsg = ''; - if (editedAllNoti.notification < 0) { - errMsg += '시간은 0 이상이어야합니다.\n'; - console.log(errMsg); - editedAllNoti.notification = ''; - } - if (errMsg) alert(errMsg); - setAllNoti({ - ...editedAllNoti, - intraID: props.value, - }); - // setModal({ modalName: null }); - }; + // const finishEditHandler = () => { + // let errMsg = ''; + // if (editedAllNoti.notification < 0) { + // errMsg += '시간은 0 이상이어야합니다.\n'; + // console.log(errMsg); + // editedAllNoti.notification = ''; + // } + // if (errMsg) alert(errMsg); + // setAllNoti({ + // ...editedAllNoti, + // intraID: props.value, + // }); + // // setModal({ modalName: null }); + // }; useEffect(() => { console.log({ allNoti }); return () => { @@ -63,7 +74,24 @@ export default function AdminNotiAllModal(props: any) { }; }, [allNoti]); const setModal = useSetRecoilState(modalState); + const finishEditHandler = () => setModal({ modalName: null }); const cancelEditHandler = () => setModal({ modalName: null }); + const [open, setOpen] = React.useState(false); + + const handleClick = () => { + setOpen(true); + }; + + const handleClose = ( + event?: React.SyntheticEvent | Event, + reason?: string + ) => { + if (reason === 'clickaway') { + return; + } + + setOpen(false); + }; return (
@@ -84,12 +112,25 @@ export default function AdminNotiAllModal(props: any) {
- + + + + + This is a success message! + + + diff --git a/components/toastmsg/toastmsg.tsx b/components/toastmsg/toastmsg.tsx index dee4f873f..3621dce62 100644 --- a/components/toastmsg/toastmsg.tsx +++ b/components/toastmsg/toastmsg.tsx @@ -39,10 +39,6 @@ export default function CustomizedSnackbars() { This is a success message! - This is an error message! - This is a warning message! - This is an information message! - This is a success message! ); }