Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/components/card/Review/ReviewCardAddText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ const ReviewCardAddText = ({
alt={`${nickname}의 여행리뷰 이미지`}
width={100}
height={100}
className="h-full w-full object-cover"
className="h-full w-full object-cover transition-opacity duration-300"
style={{ opacity: 0 }}
onLoadingComplete={(img: HTMLImageElement) => {
const imgElement = img;
imgElement.style.opacity = '1';
}}
/>
</div>
<div className="flex w-full flex-col gap-2">
Expand Down
6 changes: 5 additions & 1 deletion src/components/card/travel/TravelCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,11 @@ const TravelCard = ({
alt={`${travelName} - ${location} 여행 이미지`}
width={300}
height={300}
className="h-full w-full rounded object-cover"
className="h-full w-full rounded object-cover opacity-0 duration-300 ease-in-out"
onLoadingComplete={(img) => {
img.classList.remove('opacity-0');
img.classList.add('opacity-100');
}}
/>
{closed && (
<div className="body-3-sb absolute inset-0 z-10 flex items-center justify-center text-primary-white">
Expand Down
6 changes: 5 additions & 1 deletion src/components/card/travel/TravelCardBig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ const TravelCardBig = ({
alt={`${travelName} - ${location} 여행 이미지`}
width={400}
height={200}
className="h-full w-full object-cover"
className="h-full w-full object-cover opacity-0 duration-300 ease-in-out"
onLoadingComplete={(img) => {
img.classList.remove('opacity-0');
img.classList.add('opacity-100');
}}
/>
{closed && (
<div className="body-3-sb absolute inset-0 z-10 flex items-center justify-center text-primary-white">
Expand Down
7 changes: 6 additions & 1 deletion src/components/card/travel/TravelPlanCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ const TravelPlanCard = ({
alt={`${destination} 일정 이미지`}
width={600}
height={500}
className="h-full w-full object-cover"
className="h-full w-full object-cover transition-opacity duration-300 ease-in-out"
style={{ opacity: 0 }}
onLoadingComplete={(img: HTMLImageElement) => {
const imgElement = img;
imgElement.style.opacity = '1';
}}
/>
</div>

Expand Down
2 changes: 1 addition & 1 deletion src/components/travel/detail/TravelDetailCategory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const TravelDetailCategory = ({
];

return (
<section className="mx-auto w-full px-5 xs:max-w-[540px] sm:px-0 md:col-span-2 md:max-w-full md:pt-4 xl:mx-0 xl:max-w-[652px]">
<section className="mx-auto min-h-[300px] w-full px-5 xs:max-w-[540px] sm:px-0 md:col-span-2 md:max-w-full md:pt-4 xl:mx-0 xl:max-w-[652px]">
<header className="heading-1-b z-20 flex items-start gap-5 border-b text-label-alternative md:gap-8">
{categories.map(({ label, value, disabled }) => (
<button
Expand Down
12 changes: 2 additions & 10 deletions src/components/travel/detail/TravelDetailContainer.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import {
dehydrate,
HydrationBoundary,
QueryClient,
} from '@tanstack/react-query';
import { QueryClient } from '@tanstack/react-query';
import { getTravelDetail } from '@/api/travel/travels';
import { QUERY_KEYS } from '@/constants/querykeys';
import TravelDetail from './TravelDetail';
Expand All @@ -15,11 +11,7 @@ const TravelDetailContainer = async ({ id }: { id: string }) => {
queryFn: () => getTravelDetail({ id }),
});

return (
<HydrationBoundary state={dehydrate(queryClient)}>
<TravelDetail travelDetail={data.data} />
</HydrationBoundary>
);
return <TravelDetail travelDetail={data.data} />;
};

export default TravelDetailContainer;
Loading