feat: implement getTags API and integrate with content creation form

This commit is contained in:
Ardeman
2025-03-05 17:57:52 +08:00
parent aca894729e
commit 1a1d8cc209
8 changed files with 203 additions and 40 deletions
+6
View File
@@ -1,6 +1,8 @@
import { Outlet, redirect } from 'react-router'
import { getStaff } from '~/apis/admin/get-staff'
import { getCategories } from '~/apis/common/get-categories'
import { getTags } from '~/apis/common/get-tags'
import { AUTH_PAGES } from '~/configs/pages'
import { AdminProvider } from '~/contexts/admin'
import { AdminDefaultLayout } from '~/layouts/admin/default'
@@ -28,9 +30,13 @@ export const loader = async ({ request }: Route.LoaderArgs) => {
})
staffData = data
}
const { data: categoriesData } = await getCategories()
const { data: tagsData } = await getTags()
return {
staffData,
categoriesData,
tagsData,
}
}