import { useTheme } from "@emotion/react"; import { useState } from "react"; import TabPanel from "@mui/lab/TabPanel"; import { Avatar, Box, Divider, Modal, Stack, TextField, Typography, } from "@mui/material"; import ButtonSpinner from "../../ButtonSpinner"; import Button from "../../Button"; /** * ProfilePanel component displays a form for editing user profile information * and allows for actions like updating profile picture, credentials, * and deleting account. * * @returns {JSX.Element} */ const ProfilePanel = () => { const theme = useTheme(); //TODO - use redux loading state //!! - currently all loading buttons are tied to the same state const [isLoading, setIsLoading] = useState(false); //TODO - implement delete profile picture function const handleDeletePicture = () => { setIsLoading(true); setTimeout(() => { setIsLoading(false); }, 2000); }; //TODO - implement update profile function const handleUpdatePicture = () => {}; const [isOpen, setIsOpen] = useState(false); //TODO - implement delete account function const handleDeleteAccount = () => { setIsLoading(true); setTimeout(() => { setIsLoading(false); setIsOpen(false); }, 2000); }; //TODO - implement save profile function const handleSaveProfile = () => { setIsLoading(true); setTimeout(() => { setIsLoading(false); setIsOpen(false); }, 2000); }; return (
First Name {/* TODO - use existing textfield components */}
Last Name {/* TODO - use existing textfield components */}
Email After updating, you'll receive a confirmation email. {/* TODO - use existing textfield components */}
Your Photo This photo will be displayed in your profile page. {/* TODO - Use Avatar component instead of @mui */} {/* TODO - modal popup for update pfp? */}