refactor: update loaderData imports in dashboard pages for consistency
This commit is contained in:
@@ -1,7 +1,21 @@
|
||||
import { Outlet } from 'react-router'
|
||||
|
||||
import { getCategories } from '~/apis/common/get-categories'
|
||||
import { getTags } from '~/apis/common/get-tags'
|
||||
import { AdminDashboardLayout } from '~/layouts/admin/dashboard'
|
||||
|
||||
import type { Route } from './+types/_admin.lg-admin._dashboard'
|
||||
|
||||
export const loader = async ({}: Route.LoaderArgs) => {
|
||||
const { data: categoriesData } = await getCategories()
|
||||
const { data: tagsData } = await getTags()
|
||||
|
||||
return {
|
||||
categoriesData,
|
||||
tagsData,
|
||||
}
|
||||
}
|
||||
|
||||
const DashboardLayout = () => {
|
||||
return (
|
||||
<AdminDashboardLayout>
|
||||
|
||||
Reference in New Issue
Block a user