diff --git a/src/components/common/card/ImageCard.tsx b/src/components/common/card/ImageCard.tsx index 6fe463f..f66fd16 100644 --- a/src/components/common/card/ImageCard.tsx +++ b/src/components/common/card/ImageCard.tsx @@ -34,7 +34,7 @@ export function ImageCard({ alt='와인 이미지' width={80} height={112} - className={cn('h-28 w-20 rounded-md object-cover', imageClassName)} + className={cn('h-28 w-20 rounded-md object-fit', imageClassName)} onError={() => setHasImageError(true)} /> )} diff --git a/src/components/wineDetail/WineContent.tsx b/src/components/wineDetail/WineContent.tsx index 827b5e3..f795c4d 100644 --- a/src/components/wineDetail/WineContent.tsx +++ b/src/components/wineDetail/WineContent.tsx @@ -10,7 +10,7 @@ interface Props { function WineContent({ name, region, price }: Props) { return ( -
+

{name}

diff --git a/src/pages/wines/[wineid].tsx b/src/pages/wines/[wineid].tsx index 627d3df..f86e081 100644 --- a/src/pages/wines/[wineid].tsx +++ b/src/pages/wines/[wineid].tsx @@ -4,6 +4,7 @@ import { dehydrate, QueryClient, useQuery } from '@tanstack/react-query'; import axios from 'axios'; import { GetServerSideProps } from 'next'; import dynamic from 'next/dynamic'; +import Head from 'next/head'; import { useRouter } from 'next/router'; import { getWineInfoForClient } from '@/api/getWineInfo'; @@ -47,30 +48,46 @@ export default function WineInfoById(props: WinePageProps) { } return ( -
- - - -
-
-

리뷰 목록

- + <> + + {`${data.name} 상세정보`} + + + + + + +
+ + + +
+
+

리뷰 목록

+ +
+
- -
-
+ + ); } @@ -101,9 +118,11 @@ export const getServerSideProps: GetServerSideProps = async (cont staleTime: 0, retry: false, }); - console.log(`[getServerSideProps] 와인 상세 정보 프리패치 성공 (ID: ${parsedWineId})`); } catch (error: any) { console.error(`[SSR] 와인 상세 정보 로딩 중 최종 에러:`, error.message || error); + return { + notFound: true, + }; } return {