| | |
| | | import { useWatch, useFormContext } from "react-hook-form"; |
| | | import { Stack, Grid, Box, Typography, Card, CardContent, Tabs, Tab } from '@mui/material'; |
| | | import * as Common from '@/utils/common'; |
| | | import { } from '@/config/setting'; |
| | | import BaseSettings from "./BaseSettings"; |
| | | import { queryUserInfo } from '@/api/auth'; |
| | | |
| | | const Index = () => { |
| | | const authProvider = useAuthProvider(); |
| | | const navigate = useNavigate(); |
| | | const translate = useTranslate(); |
| | | const theme = useTheme(); |
| | | const [value, setValue] = React.useState(0); |
| | | |
| | | const [value, setValue] = useState(0); |
| | | const [userInfo, setUserInfo] = useState(null); |
| | | |
| | | useEffect(() => { |
| | | authProvider.checkAuth().catch(() => { |
| | |
| | | }, [authProvider, navigate]); |
| | | |
| | | useEffect(() => { |
| | | }, [value]); |
| | | queryUserInfo().then(res => { |
| | | setUserInfo(res); |
| | | }) |
| | | }, []); |
| | | |
| | | return ( |
| | | <> |
| | |
| | | flexGrow: 1, |
| | | bgcolor: 'background.paper', |
| | | display: 'flex', |
| | | height: 224, |
| | | // height: 224, |
| | | border: `1px solid #${theme[0] === 'light' ? 'ddd' : '333'}`, |
| | | borderRadius: 2 |
| | | }} |
| | |
| | | </Tabs> |
| | | <BaseSettings |
| | | value={value} |
| | | userInfo={userInfo} |
| | | /> |
| | | <SecuritySettings |
| | | value={value} |