add validation and basic api && change design sidebar

This commit is contained in:
ehsanahmadi456
2025-04-01 15:38:07 +03:30
parent b09957f97c
commit 13a9de2438
8 changed files with 41 additions and 12 deletions
+8 -1
View File
@@ -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"
>
خروج