Skip to content

Commit

Permalink
feat: 해커톤 관리 페이지 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
llddang committed Dec 11, 2024
1 parent 64f1e90 commit 66bdf06
Showing 1 changed file with 44 additions and 2 deletions.
46 changes: 44 additions & 2 deletions frontend/src/app/admin/hackathon/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,49 @@
export default function ContestListPage() {
import PageTitle from '@/components/common/PageTitle';
import AdminHackathonManageTable from '@/components/ui/admin/hackathon/AdminHackathonManageTable';
import AdminHackathonSearchBox from '@/components/ui/admin/hackathon/AdminHackathonSearchBox';
import { getAuthFromCookie } from '@/lib/utils/auth';
import { AuthSliceState } from '@/store/auth.slice';
import { HackathonManageDto } from '@/types/common.dto';
import { headers } from 'next/headers';

export interface HackathonListPageProps {
searchParams?: { [key: string]: string | undefined };
}

export default function HackathonListPage({ searchParams }: HackathonListPageProps) {
const headersList = headers();
const pathname = headersList.get('x-pathname') || '';

const auth: AuthSliceState = getAuthFromCookie();

const page = searchParams?.page ? parseInt(searchParams.page, 10) : 1;
const keyword = searchParams?.keyword ? searchParams.keyword : '';

// TODO: api 연결
const hackathonInfos: HackathonManageDto[] = [
{
id: 1,
title: '제 8회 2024-2 PNU SW+X 문제해결 경진대회',
hackathonStartDate: '2024-09-01',
hackathonEndDate: '2024-12-01',
teamCode: '1234',
isActive: false,
},
{
id: 2,
title: '제 7회 2024-2 PNU SW+X 문제해결 경진대회',
hackathonStartDate: '2024-09-01',
hackathonEndDate: '2024-12-01',
teamCode: '1234',
isActive: false,
},
];

return (
<div className="w-full">
<div className="flex h-40 w-full items-center justify-center text-comment">개발 중인 기능입니다.</div>
<PageTitle title="해커톤 목록" />
<AdminHackathonSearchBox count={hackathonInfos.length} page={page} keyword={keyword} status={1} />
<AdminHackathonManageTable hackathonInfos={hackathonInfos} />
</div>
);
}

0 comments on commit 66bdf06

Please sign in to comment.