feat: update staff API schema and refactor admin login paths

This commit is contained in:
Ardeman 2025-03-03 17:33:52 +08:00
parent 459e25c010
commit 599a92fba3
3 changed files with 3 additions and 9 deletions

View File

@ -6,7 +6,8 @@ const staffSchema = z.object({
data: z.object({
id: z.string(),
email: z.string(),
username: z.string(),
name: z.string(),
profile_picture: z.string(),
}),
})

View File

@ -18,13 +18,9 @@ export const META_TITLE_CONFIG: TMetaTitleConfig = [
title: 'Home',
},
{
path: '/lg-admin/auth/login',
path: '/lg-admin/login',
title: 'Login',
},
{
path: '/lg-admin/auth/register',
title: 'Register',
},
...ADMIN_MENU.flatMap((menu) =>
menu.items.map((item) => ({ path: item.url, title: item.title })),
),

View File

@ -33,9 +33,6 @@ export const AdminLoginPage = () => {
setDisabled(false)
return
}
setDisabled(true)
setError(undefined)
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [fetcher])