File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
import type { Metadata } from 'next';
import { verifySession } from '@/lib/auth/dal';
import { fetchBoardPosts } from '@/lib/data/repositories/board-post-repository';
import { parseBoardPostQuery } from '@/lib/domain/board-post-query';
import { BoardPostList } from '../_components/board-post-list';
export const metadata: Metadata = { title: 'FAQ' };
export const dynamic = 'force-dynamic';
interface PageProps {
searchParams: Promise<Record<string, string | string[] | undefined>>;
}
export default async function Page({ searchParams }: PageProps) {
await verifySession();
const query = parseBoardPostQuery('faq', await searchParams);
const { items, totalCount } = await fetchBoardPosts('faq', query);
const totalPages = Math.max(1, Math.ceil(totalCount / query.pageSize));
const currentPage = Math.min(query.page, totalPages);
return (
<BoardPostList
boardType="faq"
title="FAQ 목록"
breadcrumb={[
{ label: '홈', href: '/' },
{ label: '게시판 관리(고객센터)' },
{ label: 'FAQ' },
]}
items={items}
query={query}
currentPage={currentPage}
totalPages={totalPages}
totalCount={totalCount}
/>
);
}