import PropTypes from "prop-types"; import { useState } from "react"; import { Box, Typography, Tab, useTheme, TextField, Avatar, Stack, Divider, Modal, } from "@mui/material"; import TabPanel from "@mui/lab/TabPanel"; import TabContext from "@mui/lab/TabContext"; import TabList from "@mui/lab/TabList"; import "./index.css"; import ButtonSpinner from "../../Components/ButtonSpinner"; import Button from "../../Components/Button"; const tabList = ["Profile", "Password", "Team"]; const Settings = () => { //(tab) 0 - Profile //(tab) 1 - Password //(tab) 2 - Team const [tab, setTab] = useState("0"); const handleTabChange = (event, newTab) => { setTab(newTab); }; const theme = useTheme(); const [isLoading, setIsLoading] = useState(false); //TODO - implement delete profile picture function const handleDeletePicture = () => { setIsLoading(true); setTimeout(() => { setIsLoading(false); }, 2000); }; //TODO - implement delete profile update function const handleUpdatePicture = () => {}; const [isOpen, setIsOpen] = useState(false); //TODO - implement delete account function const handleDeleteAccount = () => { setIsLoading(true); setTimeout(() => { setIsLoading(false); setIsOpen(false); }, 2000); }; return ( {tabList.map((label, index) => ( ))}
First name
Last name
Email After updating, you'll receive a confirmation email.
Your photo This photo will be displayed in your profile page. {/* TODO - Use Avatar component instead of @mui */} {/* TODO - modal popup for update pfp? */}
Delete account Note that deleting your account will remove all data from our system. This is permanent and non-recoverable.
Password Team
{/* TODO - Update ModalPopup Component with @mui for reusability */} {/* */} setIsOpen(false)} disablePortal > Really delete this account? If you delete your account, you will no longer be able to sign in, and all of your data will be deleted. Deleting your account is permanent and non-recoverable action.