This commit is contained in:
louiscklaw
2025-05-30 01:14:10 +08:00
parent 98bc3fe3ce
commit 834f58bde1
52 changed files with 624 additions and 604 deletions

View File

@@ -1,7 +1,8 @@
import { _userList } from 'src/_mock/_user';
// import { _userList } from 'src/_mock/_user';
import { CONFIG } from 'src/global-config';
import { useParams } from 'src/routes/hooks';
import { UserEditView } from 'src/sections/user/view';
import { useGetUser } from 'src/actions/user';
// ----------------------------------------------------------------------
@@ -10,13 +11,15 @@ const metadata = { title: `User edit | Dashboard - ${CONFIG.appName}` };
export default function Page() {
const { id = '' } = useParams();
const currentUser = _userList.find((user) => user.id === id);
// TODO: remove me
// const currentUser = _userList.find((user) => user.id === id);
const { user } = useGetUser(id);
return (
<>
<title>{metadata.title}</title>
<UserEditView user={currentUser} />
<UserEditView user={user} />
</>
);
}