import { getNews } from '~/apis/common/get-news'
import { ContentsPage } from '~/pages/dashboard-contents'

import type { Route } from './+types/_admin.lg-admin._dashboard.contents._index'

export const loader = async ({}: Route.LoaderArgs) => {
  const { data: newsData } = await getNews()
  return { newsData }
}

const DashboardContentsIndexLayout = () => <ContentsPage />
export default DashboardContentsIndexLayout
