Skip to content

Commit

Permalink
feat : seminar detail 페이지에 header, banner, pdf, review 배치 #19
Browse files Browse the repository at this point in the history
- routing id 수정 필요
  • Loading branch information
bianbbc87 committed Apr 18, 2024
1 parent 817d830 commit fd3fd40
Showing 1 changed file with 36 additions and 3 deletions.
39 changes: 36 additions & 3 deletions src/app/seminar/[id]/page.tsx
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;

0 comments on commit fd3fd40

Please sign in to comment.