-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
44 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
); | ||
} |