From b2d8b06bf91686283cfb07d1110cfad44f313bf1 Mon Sep 17 00:00:00 2001 From: kimkimjunjun Date: Mon, 14 Oct 2024 18:12:09 +0900 Subject: [PATCH] =?UTF-8?q?design:=20=ED=85=8D=EC=8A=A4=ED=8A=B8=20?= =?UTF-8?q?=EB=B0=8F=20=ED=8B=B0=EC=BC=93=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 | 36 +++++++++++++++++++------------- src/app/edits/[editNum]/page.tsx | 22 +++++++++---------- tailwind.config.ts | 1 + 3 files changed, 34 insertions(+), 25 deletions(-) diff --git a/src/app/board/[boardId]/page.tsx b/src/app/board/[boardId]/page.tsx index 6da8867..0b2f45f 100644 --- a/src/app/board/[boardId]/page.tsx +++ b/src/app/board/[boardId]/page.tsx @@ -423,7 +423,7 @@ export default function BoardPage({ params }: { params: { boardId: number } }) { setReplyNickname(nickName); setReplyMemId(memberId); }; - // console.log(postData); + console.log(postData); const getTransportImage = (transport: string, ticketColor: any) => { switch (transport) { @@ -639,12 +639,12 @@ export default function BoardPage({ params }: { params: { boardId: number } }) {
-
+
-

+

{postData?.result.ticket.departureCode}

@@ -654,7 +654,7 @@ export default function BoardPage({ params }: { params: { boardId: number } }) {
-
+
{getTransportImage( postData?.result.ticket.transport, postData?.result.ticket.ticketColor @@ -664,7 +664,7 @@ export default function BoardPage({ params }: { params: { boardId: number } }) {

{postData?.result.ticket.destinationCode}

-
+
5 || postData?.result.ticket.departure?.length > 5 ? 'text-[2rem]' : 'xl:text-[2rem] lg:text-[1.6rem] sm:text-[0.8rem]'}`}> {postData?.result.ticket.destination} @@ -706,7 +706,7 @@ export default function BoardPage({ params }: { params: { boardId: number } }) {
@@ -726,7 +726,7 @@ export default function BoardPage({ params }: { params: { boardId: number } }) {
-
+
{bodyWithImages.split(/<\/?p>/).filter(Boolean).map((item: string, index: number) => { const trimmedItem = item.trim(); // 공백 제거 @@ -741,11 +741,11 @@ export default function BoardPage({ params }: { params: { boardId: number } }) { return (
); @@ -764,7 +764,7 @@ export default function BoardPage({ params }: { params: { boardId: number } }) { return (
'로 변환 + const cleanText = trimmedItem + .replace(/</g, '<') + .replace(/>/g, '>') + .replace(/ /g, '') + .replace(/<\/?[^>]+(>|$)/g, ""); // 모든 HTML 태그 제거 + // 텍스트인 경우 return (

- {trimmedItem} + {cleanText}

); })} -
+ +
{postData?.result.post.tags.map((tagData: string, index: number) => ( { - if (!startDates || !endDates) return ''; - return `${formatDates(startDates)} ~ ${formatDates(endDates)}`; - }; + // const formatDateRange = () => { + // if (!startDates || !endDates) return ''; + // return `${formatDates(startDates)} ~ ${formatDates(endDates)}`; + // }; @@ -387,7 +387,7 @@ function PostEdit({ params }: { params: { editNum: number } }) { } }; }, [thumbnailPreview]); - console.log(formatDates(startDate), formatDates(endDate)) + // console.log(formatDates(startDate), formatDates(endDate)) const handleInputChange = (e: React.ChangeEvent) => { diff --git a/tailwind.config.ts b/tailwind.config.ts index 85e617e..f6a606e 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -32,6 +32,7 @@ const config: Config = { 'xs-400': '400px', 'md': '800px', + 'sm-640': '640px', 'sm-700': '700px', 'md-850': '850px', 'md-1000': '1000px',