Skip to content

Commit

Permalink
Feat: DetailPage 기본 구조
Browse files Browse the repository at this point in the history
  • Loading branch information
shlee9999 committed Oct 7, 2024
1 parent 7233d70 commit a889069
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/pages/DetailPage/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,24 @@
import { useParams } from 'react-router-dom';
import * as S from './styles';
import usePDetail from '@/hooks/usePDetail';
import { DetailImageContainer } from '@/components/DetailImageContainer';

export default function DetailPage() {
const { id } = useParams<{ id: string }>();
const { data } = usePDetail({ mt20id: id });

return <S.DetailPage>DetailPage {id}</S.DetailPage>;
return (
<S.DetailPage>
DetailPage {id}
{/* DetailInfoPanel 넣기 */}
<S.Panel>
<S.Title>공연 예고편</S.Title>
{/* Trailer 넣기 */}
</S.Panel>
<S.Panel>
<S.Title>상세 이미지</S.Title>
<DetailImageContainer detailImgList={data?.dbs?.db.styurls.styurl.map(styurl => ({ src: styurl })) || []} />
</S.Panel>
</S.DetailPage>
);
}
9 changes: 9 additions & 0 deletions src/pages/DetailPage/styles.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
import { H24 } from '@/components/Text';
import { styled } from 'styled-components';

export const DetailPage = styled.div`
margin: 0 auto;
max-width: ${({ theme }) => theme.layout.max_width};
`;

export const Title = styled(H24)`
margin-bottom: 20px;
`;

export const Panel = styled.div`
margin-bottom: 100px;
`;

0 comments on commit a889069

Please sign in to comment.