change component name for clarity
This commit is contained in:
1 parent
c3f24a1693
commit
8af4fd8e3e
3 files changed
+9
-9
No files matched your search
@@ -2,7 +2,7 @@ import { Box, useTheme } from "@mui/material";
|
|||||||
import { TabList } from "@mui/lab";
|
import { TabList } from "@mui/lab";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
|
|
||||||
const TabListWrapper = ({ value, onChange, children, ...props }) => {
|
const CustomTabList = ({ value, onChange, children, ...props }) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -19,10 +19,10 @@ const TabListWrapper = ({ value, onChange, children, ...props }) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
TabListWrapper.propTypes = {
|
CustomTabList.propTypes = {
|
||||||
value: PropTypes.string,
|
value: PropTypes.string,
|
||||||
onChange: PropTypes.func,
|
onChange: PropTypes.func,
|
||||||
children: PropTypes.node,
|
children: PropTypes.node,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default TabListWrapper;
|
export default CustomTabList;
|
||||||
@@ -3,7 +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 CustomTabList 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";
|
||||||
@@ -60,7 +60,7 @@ const Account = ({ open = "profile" }) => {
|
|||||||
py={theme.spacing(12)}
|
py={theme.spacing(12)}
|
||||||
>
|
>
|
||||||
<TabContext value={tab}>
|
<TabContext value={tab}>
|
||||||
<TabListWrapper value={tab} onChange={handleTabChange} aria-label="account tabs">
|
<CustomTabList value={tab} onChange={handleTabChange} aria-label="account tabs">
|
||||||
{tabList.map((label, index) => (
|
{tabList.map((label, index) => (
|
||||||
<Tab
|
<Tab
|
||||||
label={label}
|
label={label}
|
||||||
@@ -71,7 +71,7 @@ const Account = ({ open = "profile" }) => {
|
|||||||
tabIndex={index}
|
tabIndex={index}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
</TabListWrapper>
|
</CustomTabList>
|
||||||
<ProfilePanel />
|
<ProfilePanel />
|
||||||
{user.role.includes("superadmin") && <PasswordPanel />}
|
{user.role.includes("superadmin") && <PasswordPanel />}
|
||||||
{!hideTeams && <TeamPanel />}
|
{!hideTeams && <TeamPanel />}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import Content from "./Content";
|
|||||||
|
|
||||||
// Utils
|
// Utils
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import TabListWrapper from "../../../../../Components/Tab";
|
import CustomTabList from "../../../../../Components/Tab";
|
||||||
|
|
||||||
const Tabs = ({
|
const Tabs = ({
|
||||||
isCreate,
|
isCreate,
|
||||||
@@ -27,7 +27,7 @@ const Tabs = ({
|
|||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
return (
|
return (
|
||||||
<TabContext value={TAB_LIST[tab]}>
|
<TabContext value={TAB_LIST[tab]}>
|
||||||
<TabListWrapper
|
<CustomTabList
|
||||||
onChange={(_, selected) => {
|
onChange={(_, selected) => {
|
||||||
setTab(TAB_LIST.indexOf(selected));
|
setTab(TAB_LIST.indexOf(selected));
|
||||||
}}
|
}}
|
||||||
@@ -40,7 +40,7 @@ const Tabs = ({
|
|||||||
value={tabLabel}
|
value={tabLabel}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
</TabListWrapper>
|
</CustomTabList>
|
||||||
{tab === 0 ? (
|
{tab === 0 ? (
|
||||||
<Settings
|
<Settings
|
||||||
tabValue={TAB_LIST[0]}
|
tabValue={TAB_LIST[0]}
|
||||||
|
|||||||
Reference in new issue
Block a user