#
vincentlu
2025-02-08 38c75eae922335271cbf075acc1a0aa5e11c52b2
rsf-admin/src/page/settings/index.jsx
@@ -22,6 +22,7 @@
import { Stack, Grid, Box, Typography, Card, CardContent, Tabs, Tab } from '@mui/material';
import * as Common from '@/utils/common';
import BaseSettings from "./BaseSettings";
import SecuritySettings from "./SecuritySettings"
import { queryUserInfo } from '@/api/auth';
const Index = () => {
@@ -85,34 +86,24 @@
                                aria-controls='vertical-tabpanel-1'
                            />
                        </Tabs>
                        <BaseSettings
                            value={value}
                            userInfo={userInfo}
                        />
                        <SecuritySettings
                            value={value}
                        />
                        {value === 0 && (
                            <BaseSettings
                                value={value}
                                userInfo={userInfo}
                            />
                        )}
                        {value === 1 && (
                            <SecuritySettings
                                value={value}
                                userInfo={userInfo}
                            />
                        )}
                    </Box>
                </CardContent>
            </Card>
        </>
    )
}
const SecuritySettings = (props) => {
    const { children, value, ...other } = props;
    return (
        <Box
            hidden={value !== 1}
            sx={{ p: 3 }}
            {...other}
        >
            <Typography>
                Security Settings
            </Typography>
        </Box>
    )
}