Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
2 changes: 0 additions & 2 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import getMe from "@/api/user/get-me";
import KaKaoInitializer from "@/lib/kakao-initializer";
import ToastProvider from "@/providers/toast/toast-provider";
import "@chatscope/chat-ui-kit-styles/dist/default/styles.min.css";
import { ToastContainer } from "react-toastify";

export function generateMetadata() {
return METADATA;
Expand All @@ -33,7 +32,6 @@ export default async function RootLayout({
<ToastProvider />
</QueryProvider>
<KaKaoInitializer />
<ToastContainer position="top-right" autoClose={1500} />
</body>
</html>
);
Expand Down
9 changes: 5 additions & 4 deletions src/app/myprofile/_components/review-item/review-info.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { cn, isValidImageSrc } from "@/lib/utils";
import Image from "next/image";
import { WineType } from "../../_types/review-type";
import { useState } from "react";
import PlaceholderImgWine from "@/../public/images/placeholder/img-wine.svg";

const PLACEHOLDER = "/images/placeholder/img-wine.svg";

Expand All @@ -29,10 +28,12 @@ const ReviewInfo = ({ info }: { info: WineType }) => {
onError={() => setImgSrc(PLACEHOLDER)}
/>
) : (
<PlaceholderImgWine
<Image
src={"/images/placeholder/img-wine.svg"}
width={60}
height={60}
className="h-[60px] w-[46px] tablet:h-[80px] tablet:w-[60px] pc:h-[80px] pc:w-[60px]"
role="img"
aria-label={`${info.name} 이미지 불러오기 실패`}
alt={`${info.name} 이미지 불러오기 실패`}
/>
)}
<div
Expand Down
23 changes: 12 additions & 11 deletions src/app/wines/[id]/_components/wine-header/wine-header.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Image from "next/image";
import PlaceholderImgWine from "@/../public/images/placeholder/img-wine.svg";
import Rating from "@/components/rating/rating";
import type { WineDetail } from "@/types/wine";
import { cn, isValidImageSrc } from "@/lib/utils";
Expand Down Expand Up @@ -45,8 +44,8 @@ const WineHeader = ({ wine }: WineHeaderProps) => {
"pc:h-[320px] pc:w-[320px] pc:max-w-none"
)}
>
{isValidImageSrc(wine.image) ? (
<div className="relative h-full w-full">
<div className="relative h-full w-full">
{isValidImageSrc(wine.image) ? (
<Image
src={wine.image}
alt={wine.name}
Expand All @@ -57,14 +56,16 @@ const WineHeader = ({ wine }: WineHeaderProps) => {
sizes="(max-width: 743px) 220px, (max-width: 1279px) 280px, 320px"
className="object-contain"
/>
</div>
) : (
<PlaceholderImgWine
className="h-full w-auto object-contain"
role="img"
aria-label={`${wine.name} 이미지 불러오기 실패`}
/>
)}
) : (
<Image
src={"/images/placeholder/img-wine.svg"}
fill
sizes="(max-width: 743px) 220px, (max-width: 1279px) 280px, 320px"
className="object-contain"
alt={`${name} 이미지 불러오기 실패`}
/>
)}
</div>
</div>
</div>

Expand Down
23 changes: 12 additions & 11 deletions src/app/wines/[id]/_components/wine-info.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Image from "next/image";
import PlaceholderImgWine from "@/../public/images/placeholder/img-wine.svg";
// import PlaceholderImgWine from "@/../public/images/placeholder/img-wine.svg";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

주석 처리된 코드는 삭제하셔도 될 것 같습니다!

import { isValidImageSrc } from "@/lib/utils";

interface WineInfoProps {
Expand All @@ -12,23 +12,24 @@ const WineInfo = ({ name, region, image }: WineInfoProps) => {
return (
<div className="flex items-center gap-4">
<div className="flex-center h-[96px] w-[62px] flex-shrink-0 bg-gray-200">
{isValidImageSrc(image) ? (
<div className="relative h-full w-full">
<div className="relative h-full w-full">
{isValidImageSrc(image) ? (
<Image
src={image}
alt={name}
fill
className="object-contain"
sizes="62px"
/>
</div>
) : (
<PlaceholderImgWine
className="h-full w-auto object-contain"
role="img"
aria-label={`${name} 이미지 불러오기 실패`}
/>
)}
) : (
<Image
src={"/images/placeholder/img-wine.svg"}
fill
className="object-contain"
alt={`${name} 이미지 불러오기 실패`}
/>
)}
</div>
</div>
<div className="flex min-w-0 flex-col gap-1">
<h3
Expand Down
8 changes: 1 addition & 7 deletions src/components/card/card-img.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { SVGProps } from "react";
import { cn } from "@/lib/utils";
import Image from "next/image";
import BASE64_IMAGES from "@/constants/base64-images";
import PlaceholderImgWine from "@/../public/images/placeholder/img-wine.svg";

const { WINE_BASE64 } = BASE64_IMAGES;

Expand Down Expand Up @@ -33,7 +32,6 @@ const CardImage = ({
alt,
blurDataURL,
fallbackBlurDataURL = WINE_BASE64,
fallbackImage: FallbackImage = PlaceholderImgWine,
className,
imageClassName,
}: CardImageProps) => {
Expand Down Expand Up @@ -79,11 +77,7 @@ const CardImage = ({
onError={() => setHasError(true)}
/>
) : (
<FallbackImage
className="relative left-[50%] h-full w-auto translate-x-[-50%] object-contain"
role="img"
aria-label={`${alt} 이미지 불러오기 실패`}
/>
<Image src={"/images/placeholder/img-wine.svg"} fill alt={alt} />
)}
</span>
</div>
Expand Down