update accounts page to use new Tab component

This commit is contained in:
Vishnu Sreekumaran Nair committed 2025-04-10 14:50:06 -04:00
1 parent 6421080a95
commit d8678bb772
1 file changed
+3 -13
+3 -13
View File
@@ -3,6 +3,7 @@ import PropTypes from "prop-types";
import { useNavigate } from "react-router"; import { useNavigate } from "react-router";
import { useSelector } from "react-redux"; import { useSelector } from "react-redux";
import { Box, Tab, useTheme } from "@mui/material"; import { Box, Tab, useTheme } from "@mui/material";
import TabListWrapper from "../../Components/Tab";
import TabContext from "@mui/lab/TabContext"; import TabContext from "@mui/lab/TabContext";
import TabList from "@mui/lab/TabList"; import TabList from "@mui/lab/TabList";
import ProfilePanel from "../../Components/TabPanels/Account/ProfilePanel"; import ProfilePanel from "../../Components/TabPanels/Account/ProfilePanel";
@@ -59,17 +60,7 @@ const Account = ({ open = "profile" }) => {
py={theme.spacing(12)} py={theme.spacing(12)}
> >
<TabContext value={tab}> <TabContext value={tab}>
<Box <TabListWrapper value={tab} onChange={handleTabChange} aria-label="account tabs">
sx={{
borderBottom: 1,
borderColor: theme.palette.primary.lowContrast,
"& .MuiTabs-root": { height: "fit-content", minHeight: "0" },
}}
>
<TabList
onChange={handleTabChange}
aria-label="account tabs"
>
{tabList.map((label, index) => ( {tabList.map((label, index) => (
<Tab <Tab
label={label} label={label}
@@ -80,8 +71,7 @@ const Account = ({ open = "profile" }) => {
tabIndex={index} tabIndex={index}
/> />
))} ))}
</TabList> </TabListWrapper>
</Box>
<ProfilePanel /> <ProfilePanel />
{user.role.includes("superadmin") && <PasswordPanel />} {user.role.includes("superadmin") && <PasswordPanel />}
{!hideTeams && <TeamPanel />} {!hideTeams && <TeamPanel />}