-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat : seminar detail 페이지에 header, banner, pdf, review 배치 #19
- routing id 수정 필요
- Loading branch information
Showing
1 changed file
with
36 additions
and
3 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,40 @@ | ||
'use client'; | ||
|
||
import React from 'react'; | ||
import { useRouter } from 'next/navigation'; | ||
import SeminarDetailHeader from '@/components/seminar/seminarDetail/header/SeminarDetailHeader'; | ||
import SeminarDetailBanner from '@/components/seminar/seminarDetail/banner/SeminarDetailBanner'; | ||
import { SEMINAR_DATA } from '@/constants/seminar/seminarData'; | ||
import SeminarDetailPdf from '@/components/seminar/seminarDetail/pdf/SeminarDetailPdf'; | ||
import NotFoundPage from '@/app/not-found'; | ||
import SeminarDetailReview from '@/components/seminar/seminarDetail/review/SeminarDetailReview'; | ||
|
||
const SeminarDetailPage = () => { | ||
const router = useRouter(); | ||
console.log(router); | ||
|
||
// 객체 찾기 | ||
const seminar = SEMINAR_DATA.find(seminar => Number(seminar.id) === 1); | ||
|
||
if (!seminar) { | ||
// 세미나를 찾지 못한 경우 | ||
return <NotFoundPage />; | ||
} | ||
|
||
|
||
return <div className="w-4/5 px-10 my-20 mx-auto"> | ||
{/* header */} | ||
<SeminarDetailHeader key={`${seminar.id}_header`} data={seminar}/> | ||
|
||
{/* banner */} | ||
<SeminarDetailBanner key={`${seminar.id}_banner`} data={seminar}/> | ||
|
||
{/* pdf file */} | ||
<SeminarDetailPdf key={`${seminar.id}_pdf`}/> | ||
|
||
const CommunityDetailPage = () => { | ||
return <div className="w-4/5 px-10">CommunityDetail 페이지입니당</div>; | ||
{/* review */} | ||
<SeminarDetailReview /> | ||
</div>; | ||
}; | ||
|
||
export default CommunityDetailPage; | ||
export default SeminarDetailPage; |