From 6954d7e19ea0a97eeecec33a28e396f22ea33707 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@gmail.com>
Date: 星期五, 18 四月 2025 14:44:54 +0800
Subject: [PATCH] #
---
zy-acs-flow/src/page/settings/Settings.jsx | 26 +++++++++++++++++++++++---
1 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/zy-acs-flow/src/page/settings/Settings.jsx b/zy-acs-flow/src/page/settings/Settings.jsx
index 3240442..7833c47 100644
--- a/zy-acs-flow/src/page/settings/Settings.jsx
+++ b/zy-acs-flow/src/page/settings/Settings.jsx
@@ -1,4 +1,5 @@
import React, { useState, useRef, useEffect, useMemo } from "react";
+import { useNavigate } from 'react-router-dom';
import {
Edit,
SimpleForm,
@@ -15,6 +16,7 @@
required,
useRecordContext,
useTheme,
+ useAuthProvider,
} from 'react-admin';
import { useWatch, useFormContext } from "react-hook-form";
import { Stack, Grid, Box, Typography, Card, CardContent, Tabs, Tab } from '@mui/material';
@@ -22,9 +24,17 @@
import { } from '@/config/setting';
const Settings = () => {
+ const authProvider = useAuthProvider();
+ const navigate = useNavigate();
const translate = useTranslate();
const theme = useTheme();
const [value, setValue] = React.useState(0);
+
+ useEffect(() => {
+ authProvider.checkAuth().catch(() => {
+ navigate('/login');
+ });
+ }, [authProvider, navigate]);
useEffect(() => {
}, [value]);
@@ -91,9 +101,19 @@
sx={{ p: 3 }}
{...other}
>
- <Typography>
- Base Settings
- </Typography>
+ <Grid container spacing={6}>
+ <Grid item xs={12}>
+ {/* https://github.com/themeselection/materio-mui-nextjs-admin-template-free/blob/main/javascript-version/src/views/account-settings/account/AccountDetails.jsx */}
+ <Card>
+ <CardContent className='mbe-5'>
+ <Typography>
+ Base Settings
+ </Typography>
+ </CardContent>
+ </Card>
+
+ </Grid>
+ </Grid>
</Box>
)
--
Gitblit v1.9.1