From e815e351bce790abd7afd22f9492a0a8800930c8 Mon Sep 17 00:00:00 2001 From: kimkimjunjun Date: Mon, 23 Sep 2024 20:12:36 +0900 Subject: [PATCH] =?UTF-8?q?design:=20=EA=B2=8C=EC=8B=9C=EA=B8=80=20?= =?UTF-8?q?=EC=9A=B4=ED=96=89=EC=88=98=EB=8B=A8=20ui=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/board/[boardId]/page.tsx | 25 ++++++++++++++++++++++--- src/components/transportsvg/post.tsx | 2 +- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/app/board/[boardId]/page.tsx b/src/app/board/[boardId]/page.tsx index 1e70d8f3..f5ca66dd 100644 --- a/src/app/board/[boardId]/page.tsx +++ b/src/app/board/[boardId]/page.tsx @@ -36,6 +36,7 @@ import deleteBoard from "@/services/board/delete/deleteBoard"; import Swal from "sweetalert2"; import menubars from "@/dummy/menubars.svg" import deleteReply from "@/services/board/delete/deleteReply"; +import { PostAirSVG, PostBusSVG, PostBycicleSVG, PostCarSVG, PostTrainSVG } from "@/components/transportsvg/post"; export default function BoardPage({ params }: { params: { boardId: number } }) { const accessToken = Cookies.get("accessToken"); @@ -307,6 +308,24 @@ export default function BoardPage({ params }: { params: { boardId: number } }) { setReplyMemId(memberId); }; console.log(replyId); + + const getTransportImage = (transport: string, ticketColor: any) => { + switch (transport) { + case 'Airplane': + return ; + case 'Car': + return ; + case 'Bus': + return ; + case 'Bicycle': + return ; + case 'Train': + return ; + default: + return null; // 기본값 또는 대체 이미지 + } + }; + return (
@@ -376,10 +395,10 @@ export default function BoardPage({ params }: { params: { boardId: number } }) {
-
- 비행기 +
+ {getTransportImage(postData?.result.ticket.transport, postData?.result.ticket.ticketColor)}
-
+

{postData?.result.ticket.destinationCode}

diff --git a/src/components/transportsvg/post.tsx b/src/components/transportsvg/post.tsx index 1e404931..32327099 100644 --- a/src/components/transportsvg/post.tsx +++ b/src/components/transportsvg/post.tsx @@ -51,7 +51,7 @@ export const PostCarSVG = ({ fillColor }: any) => ( ) export const PostTrainSVG = ({ fillColor }: any) => ( - +