27 lines
644 B
TypeScript
27 lines
644 B
TypeScript
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>
|
|
<Outlet />
|
|
</AdminDashboardLayout>
|
|
)
|
|
}
|
|
export default DashboardLayout
|