add validation and basic api && change design sidebar
This commit is contained in:
@@ -1,8 +1,15 @@
|
||||
import { styleDefault } from "@/mui";
|
||||
import { Box, Button, Modal } from "@mui/material";
|
||||
import CloseModalD from "@/components/icons/CloseModalD";
|
||||
import { removeToken } from "@/utils";
|
||||
|
||||
function ModalLogout({ open, handleClose }) {
|
||||
const logout = () => {
|
||||
removeToken();
|
||||
window.location.pathname = '/login'
|
||||
handleClose();
|
||||
};
|
||||
|
||||
return (
|
||||
<Modal open={open} onClose={handleClose}>
|
||||
<Box
|
||||
@@ -31,7 +38,7 @@ function ModalLogout({ open, handleClose }) {
|
||||
</Button>
|
||||
<Button
|
||||
variant="contained"
|
||||
onClick={handleClose}
|
||||
onClick={logout}
|
||||
className="!py-[4px] md:!py-[6px] !min-h-[32px] md:!min-h-[39px] lg:!min-h-[46px] lg:!py-[8px] !px-[10px] md:!px-[14px] lg:!px-[18px] !rounded-[4px] !text-[#EFEFEF] !text-[12px] md:!text-[14px] lg:!text-[16px] !font-medium"
|
||||
>
|
||||
خروج
|
||||
|
||||
Reference in New Issue
Block a user