From d2f437c6daa7f7c4254e486072a54b1601a3bad5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=96=B4=EC=8A=B9=EC=A4=80?= Date: Wed, 24 Jan 2024 18:25:09 +0900 Subject: [PATCH 01/21] =?UTF-8?q?Remove:=20theme,=20globalstyle=20?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.tsx | 10 ++---- src/styles/globalStyles.ts | 65 -------------------------------------- src/styles/theme.ts | 61 ----------------------------------- 3 files changed, 2 insertions(+), 134 deletions(-) delete mode 100644 src/styles/globalStyles.ts delete mode 100644 src/styles/theme.ts diff --git a/src/App.tsx b/src/App.tsx index 909f6bac..030880f3 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,6 +1,3 @@ -import { ThemeProvider } from 'styled-components'; -import { GlobalStyle } from '@styles/globalStyles'; -import { theme } from '@styles/theme'; import { RecoilRoot } from 'recoil'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { ReactQueryDevtools } from '@tanstack/react-query-devtools'; @@ -17,11 +14,8 @@ const App = () => { - - - - - + + diff --git a/src/styles/globalStyles.ts b/src/styles/globalStyles.ts deleted file mode 100644 index e4028567..00000000 --- a/src/styles/globalStyles.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { createGlobalStyle } from 'styled-components'; - -export const GlobalStyle = createGlobalStyle` - html, body, div, span, applet, object, iframe, - h1, h2, h3, h4, h5, h6, p, blockquote, pre, - a, abbr, acronym, address, big, cite, code, - del, dfn, em, img, ins, kbd, q, s, samp, - small, strike, strong, sub, sup, tt, var, - b, u, i, center, - dl, dt, dd, ol, ul, li, - fieldset, form, label, legend, - table, caption, tbody, tfoot, thead, tr, th, td, - article, aside, canvas, details, embed, - figure, figcaption, footer, header, hgroup, - menu, nav, output, ruby, section, summary, - time, mark, audio, video, button { - margin: 0; - padding: 0; - border: 0; - font-size: 100%; - font: inherit; - vertical-align: baseline; - } - - /* HTML5 display-role reset for older browsers */ - article, aside, details, figcaption, figure, - footer, header, hgroup, menu, nav, section { - display: block; - } - - body { - line-height: 1; - } - - ol, ul { - list-style: none; - } - - blockquote, q { - quotes: none; - } - - blockquote:before, blockquote:after, - q:before, q:after { - content: ''; - content: none; - } - - table { - border-collapse: collapse; - border-spacing: 0; - } - * { - box-sizing: border-box; - } - body { - font-family: 'Pretendard Variable', sans-serif; - background-color: ${({ theme }) => theme.colors.bg_page}; - color: ${({ theme }) => theme.colors.text1}; - } - a { - text-decoration: none; - color: inherit; - } -`; diff --git a/src/styles/theme.ts b/src/styles/theme.ts deleted file mode 100644 index 93fe759f..00000000 --- a/src/styles/theme.ts +++ /dev/null @@ -1,61 +0,0 @@ -export const theme = { - colors: { - navy: '#253C59', //primary navy - blue: '#58788c', //옵션에 사용하는 두번째 blue - yellow: '#D9B70D', //찜에 사용하는 yellow - gray1: '#f8f8f8', //제일 어두운 gray - gray2: '#AFAFAF', //중간 gray - gray3: '#757575', - - error: '#CF0000', - success: '#008000', - }, - fonts: { - subtitle1: { - fontSize: '2.5rem', - fontWeight: '900', - lineHeight: '1.5', - }, - subtitle2: { - fontSize: '2rem', - fontWeight: '700', - lineHeight: '1.5', - }, - subtitle3: { - fontSize: '1.75rem', - fontWeight: '600', - lineHeight: '1.5', - }, - subtitle4: { - fontSize: '1.5rem', - fontWeight: '500', - lineHeight: '1.5', - }, - subtitle4_5: { - fontSize: '1.25rem', - fontWeight: '700', - lineHeight: '1.5', - }, - subtitle5: { - fontSize: '1rem', - fontWeight: '700', - lineHeight: '1.5', - }, - body: { - fontSize: '0.875rem', - fontWeight: '700', - lineHeight: '1.6', - }, - }, - shadows: { - shadow1: { - shadow: '0px 4px 8px rgba(0, 0, 0, 0.04)', - }, - shadow2: { - shadow: '0px 8px 16px rgba(0, 0, 0, 0.16)', - }, - shadow3: { - shadow: '0px 12px 40px rgba(0, 0, 0, 0.12)', - }, - }, -}; From 32f88af85035a140ea91435b36415efddcca4ab4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=96=B4=EC=8A=B9=EC=A4=80?= Date: Wed, 24 Jan 2024 18:37:48 +0900 Subject: [PATCH 02/21] =?UTF-8?q?Refactor:=20=ED=83=80=EC=9E=85=20?= =?UTF-8?q?=EB=B6=84=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/@types/review.types.ts | 15 ++++++++++---- src/@types/tours.types.ts | 20 +++++++++---------- src/@types/trips.types.ts | 12 +++++++++++ src/api/review.ts | 1 - .../DetailSectionBottom/DetailReviews.tsx | 1 - .../DetailSectionBottom/ReviewItem.tsx | 1 - src/components/Review/CommentItem.tsx | 1 - src/components/Review/MyReview.tsx | 1 - src/components/Review/Review.tsx | 1 - src/components/Review/ReviewComments.tsx | 1 - src/components/Review/ReviewKeyword.tsx | 1 - src/components/Tours/ToursItem.tsx | 1 - src/hooks/useReviewStats.ts | 1 - src/hooks/useReviewStatsCalculator.ts | 1 - src/recoil/review.ts | 12 ----------- src/recoil/trip.ts | 12 ----------- 16 files changed, 33 insertions(+), 49 deletions(-) diff --git a/src/@types/review.types.ts b/src/@types/review.types.ts index fe5fcb10..6f6cf219 100644 --- a/src/@types/review.types.ts +++ b/src/@types/review.types.ts @@ -1,10 +1,10 @@ -export interface Keyword { +interface Keyword { keywordId: number; content: string; - type: string; + type?: string; } -export interface CommentItemProps { +interface CommentItemProps { commentId: number; authorNickname: string; authorProfileImageUrl: string; @@ -14,7 +14,7 @@ export interface CommentItemProps { isAuthor: boolean; } -export interface MyReviewContent { +interface MyReviewContent { reviewId: number; authorNickname: string; authorProfileImageUrl: string; @@ -25,3 +25,10 @@ export interface MyReviewContent { commentCount: number; isAuthor?: boolean; } + +interface ReviewRequest { + tourItemId: number; + rating: number; + keywords: Keyword[]; + content: string; +} diff --git a/src/@types/tours.types.ts b/src/@types/tours.types.ts index 11e862e7..52776135 100644 --- a/src/@types/tours.types.ts +++ b/src/@types/tours.types.ts @@ -1,30 +1,30 @@ -export type TourKeywordInfo = { +interface TourKeywordInfo { keywordId: number; content: string; type: string; keywordCount: number; -}; +} -export interface RegionTypes { +interface RegionTypes { areaCode?: number; subAreaCode?: number; name: string; } -export interface ToursCategoryItemProps extends RegionTypes { +interface ToursCategoryItemProps extends RegionTypes { isSelected: boolean; onSelect: (name: string) => void; } -export interface ToursListProps { +interface ToursListProps { selectedRegion: string; } -export interface ToursCategoryProps extends ToursListProps { +interface ToursCategoryProps extends ToursListProps { setSelectedRegion: (region: string) => void; } -export interface TourType { +interface TourType { contentTypeId?: number; id: number; title: string; @@ -38,7 +38,7 @@ export interface TourType { latitude?: string; } -export interface LikedListType { +interface LikedListType { tripLikedItemId: number; tourItemId: number; contentTypeId: number; @@ -53,7 +53,7 @@ export interface LikedListType { notPreferTotalCount: number; } -export interface ReviewInfoItemProps { +interface ReviewInfoItemProps { reviewId: number; authorNickname: string; authorProfileImageUrl: string; @@ -72,5 +72,5 @@ export interface ReviewInfoItemProps { interface Keyword { keywordId: number; content: string; - type: string; + type?: string; } diff --git a/src/@types/trips.types.ts b/src/@types/trips.types.ts index 36f92cd8..71ab6a4f 100644 --- a/src/@types/trips.types.ts +++ b/src/@types/trips.types.ts @@ -61,3 +61,15 @@ interface TripMemeberInfo { nickname: string; profileImageUrl: string; } + +interface Participant { + memberId: number; + nickname: string; + thumbnail: string; +} + +interface Participants { + tripSurveyMemberCount: number; + tripSurveySetMemberInfos: Participant[]; + nonTripSurveySetMemberInfos: Participant[]; +} diff --git a/src/api/review.ts b/src/api/review.ts index ec7f4f43..33c11ba8 100644 --- a/src/api/review.ts +++ b/src/api/review.ts @@ -1,6 +1,5 @@ import client from './client'; import authClient from './authClient'; -import { ReviewRequest } from '@recoil/review'; // 리뷰 관련 API // 리뷰수정 diff --git a/src/components/DetailSectionBottom/DetailReviews.tsx b/src/components/DetailSectionBottom/DetailReviews.tsx index 93e1e310..ddb3161c 100644 --- a/src/components/DetailSectionBottom/DetailReviews.tsx +++ b/src/components/DetailSectionBottom/DetailReviews.tsx @@ -26,7 +26,6 @@ import ToastPopUp from '@components/common/toastpopup/ToastPopUp'; import EditDelete from '@components/common/modal/children/EditDelete'; import MyAlert from '@components/common/modal/children/MyAlert'; import { alertTypeState } from '@recoil/modal'; -import { ReviewInfoItemProps } from '@/@types/tours.types'; export default function DetailReviews({ reviewData, diff --git a/src/components/DetailSectionBottom/ReviewItem.tsx b/src/components/DetailSectionBottom/ReviewItem.tsx index 1a2817d9..051569c2 100644 --- a/src/components/DetailSectionBottom/ReviewItem.tsx +++ b/src/components/DetailSectionBottom/ReviewItem.tsx @@ -21,7 +21,6 @@ import { import { MouseEvent, useState } from 'react'; import { getEmoji } from '@utils/utils'; import { getStarFill } from '@utils/getStarFill'; -import { ReviewInfoItemProps } from '@/@types/tours.types'; const Item: React.FC = (props: ReviewInfoItemProps) => { const { diff --git a/src/components/Review/CommentItem.tsx b/src/components/Review/CommentItem.tsx index 9b8a8fdd..c74ff1c5 100644 --- a/src/components/Review/CommentItem.tsx +++ b/src/components/Review/CommentItem.tsx @@ -6,7 +6,6 @@ import { } from '@recoil/modal'; import { commentState, targetCommentIdState } from '@recoil/review'; import { useRecoilState, useSetRecoilState } from 'recoil'; -import { CommentItemProps } from '@/@types/review.types'; const CommentItem: React.FC = (props: CommentItemProps) => { const { diff --git a/src/components/Review/MyReview.tsx b/src/components/Review/MyReview.tsx index 7bb3cfb5..a675b022 100644 --- a/src/components/Review/MyReview.tsx +++ b/src/components/Review/MyReview.tsx @@ -22,7 +22,6 @@ import MyAlert from '@components/common/modal/children/MyAlert'; import { alertTypeState } from '@recoil/modal'; import { PenIcon } from '@components/common/icons/Icons'; import ScrollTopButton from '@components/Plan/ScrollTopButton'; -import { MyReviewContent } from '@/@types/review.types'; export default function MyReview() { const [reviewDataLength, setReviewDataLength] = useState(0); diff --git a/src/components/Review/Review.tsx b/src/components/Review/Review.tsx index 30335755..c60a1b28 100644 --- a/src/components/Review/Review.tsx +++ b/src/components/Review/Review.tsx @@ -15,7 +15,6 @@ import { isModalOpenState } from '@recoil/modal'; import { useRecoilState, useRecoilValue, useSetRecoilState } from 'recoil'; import { useParams, useNavigate } from 'react-router-dom'; import { useMutation, useQueryClient } from '@tanstack/react-query'; -import { ReviewRequest } from '@recoil/review'; interface EditReviewMutationParams { reviewData: ReviewRequest; targetReviewId: number; diff --git a/src/components/Review/ReviewComments.tsx b/src/components/Review/ReviewComments.tsx index 965314d2..05dd0244 100644 --- a/src/components/Review/ReviewComments.tsx +++ b/src/components/Review/ReviewComments.tsx @@ -13,7 +13,6 @@ import MyAlert from '@components/common/modal/children/MyAlert'; import { commentState, toastPopUpState } from '@recoil/review'; import { alertTypeState } from '@recoil/modal'; import ToastPopUp from '@components/common/toastpopup/ToastPopUp'; -import { CommentItemProps } from '@/@types/review.types'; export default function ReviewComments() { const params = useParams(); diff --git a/src/components/Review/ReviewKeyword.tsx b/src/components/Review/ReviewKeyword.tsx index 1b33a700..d6c24780 100644 --- a/src/components/Review/ReviewKeyword.tsx +++ b/src/components/Review/ReviewKeyword.tsx @@ -4,7 +4,6 @@ import { getReviewKeywords } from '@api/review'; import { useQuery } from '@tanstack/react-query'; import { useRecoilState } from 'recoil'; import { keywordsState } from '@recoil/review'; -import { Keyword } from '@/@types/review.types'; export default function ReviewKeyword() { const location = useLocation(); diff --git a/src/components/Tours/ToursItem.tsx b/src/components/Tours/ToursItem.tsx index 0e30a938..c6221f5c 100644 --- a/src/components/Tours/ToursItem.tsx +++ b/src/components/Tours/ToursItem.tsx @@ -1,4 +1,3 @@ -import { TourType } from '@/@types/tours.types'; import { HeartIcon, StarIcon } from '@components/common/icons/Icons'; import Like from '@components/common/like/Like'; import { useNavigate } from 'react-router-dom'; diff --git a/src/hooks/useReviewStats.ts b/src/hooks/useReviewStats.ts index 001b1a54..2c4a37fd 100644 --- a/src/hooks/useReviewStats.ts +++ b/src/hooks/useReviewStats.ts @@ -1,6 +1,5 @@ import { useQuery } from '@tanstack/react-query'; import { getToursReviews } from '@api/tours'; -import { TourKeywordInfo } from '@/@types/tours.types'; import { useParams } from 'react-router-dom'; type UseGetToursReviewsReturn = { diff --git a/src/hooks/useReviewStatsCalculator.ts b/src/hooks/useReviewStatsCalculator.ts index 88be9c15..89573b0c 100644 --- a/src/hooks/useReviewStatsCalculator.ts +++ b/src/hooks/useReviewStatsCalculator.ts @@ -1,5 +1,4 @@ import { useMemo } from 'react'; -import { TourKeywordInfo } from '@/@types/tours.types'; const getMaxMinCounts = (reviewStats: TourKeywordInfo[]) => { const counts = reviewStats.map((item) => item.keywordCount); diff --git a/src/recoil/review.ts b/src/recoil/review.ts index 4c7b0156..0aaac458 100644 --- a/src/recoil/review.ts +++ b/src/recoil/review.ts @@ -1,17 +1,5 @@ import { atom } from 'recoil'; -export interface ReviewRequest { - tourItemId: number; - rating: number; - keywords: Keyword[]; - content: string; -} - -type Keyword = { - keywordId: number; - content: string; -}; - export const ratingState = atom({ key: 'ratingState', default: 0, diff --git a/src/recoil/trip.ts b/src/recoil/trip.ts index 9df993e0..b2b7e656 100644 --- a/src/recoil/trip.ts +++ b/src/recoil/trip.ts @@ -1,17 +1,5 @@ import { atom } from 'recoil'; -type Participant = { - memberId: number; - nickname: string; - thumbnail: string; -}; - -export type Participants = { - tripSurveyMemberCount: number; - tripSurveySetMemberInfos: Participant[]; - nonTripSurveySetMemberInfos: Participant[]; -}; - export const participantsState = atom({ key: 'participantsState', default: { From 601c894439622f45b26a0f5ec5793e56a7d9cfed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=96=B4=EC=8A=B9=EC=A4=80?= Date: Thu, 25 Jan 2024 14:46:19 +0900 Subject: [PATCH 03/21] =?UTF-8?q?Fix:=EB=94=94=EC=9E=90=EC=9D=B8=20qa=20?= =?UTF-8?q?=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DetailSectionBottom/ReviewItem.tsx | 2 +- src/components/common/nav/InputComment.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/DetailSectionBottom/ReviewItem.tsx b/src/components/DetailSectionBottom/ReviewItem.tsx index 051569c2..c11e040e 100644 --- a/src/components/DetailSectionBottom/ReviewItem.tsx +++ b/src/components/DetailSectionBottom/ReviewItem.tsx @@ -184,7 +184,7 @@ const Item: React.FC = (props: ReviewInfoItemProps) => { .map((keyword, idx) => (
+ className="rounded-md bg-gray1 px-2 py-1 text-xs text-gray6"> {getEmoji(keyword.content)} {keyword.content}
))} diff --git a/src/components/common/nav/InputComment.tsx b/src/components/common/nav/InputComment.tsx index 3e3bb64d..00a343dc 100644 --- a/src/components/common/nav/InputComment.tsx +++ b/src/components/common/nav/InputComment.tsx @@ -106,7 +106,7 @@ export const InputComment: React.FC = () => { }; return ( -
+
From 1caee05197cb207fc1f68e769b77441757864598 Mon Sep 17 00:00:00 2001 From: Shim Jeong ah <35457850+joanShim@users.noreply.github.com> Date: Thu, 25 Jan 2024 14:49:13 +0900 Subject: [PATCH 04/21] =?UTF-8?q?Design:=20=EB=94=94=EC=9E=90=EC=9D=B8=20Q?= =?UTF-8?q?A=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/common/icons/Icons.tsx | 39 +++++++------------ .../common/toggleGroup/ToggleValue.tsx | 2 +- src/components/search/ResultItem.tsx | 4 +- src/components/search/SearchInput.tsx | 36 +++++++++-------- src/components/search/StartSearchBtn.tsx | 2 +- 5 files changed, 38 insertions(+), 45 deletions(-) diff --git a/src/components/common/icons/Icons.tsx b/src/components/common/icons/Icons.tsx index 5e3ce768..495e9292 100644 --- a/src/components/common/icons/Icons.tsx +++ b/src/components/common/icons/Icons.tsx @@ -724,32 +724,23 @@ export const SearchIcon: React.FC = ({ }) => { return ( - - - - + fill={fill}> + + ); }; diff --git a/src/components/common/toggleGroup/ToggleValue.tsx b/src/components/common/toggleGroup/ToggleValue.tsx index fffff6dc..57764632 100644 --- a/src/components/common/toggleGroup/ToggleValue.tsx +++ b/src/components/common/toggleGroup/ToggleValue.tsx @@ -16,7 +16,7 @@ export const ToggleValue = ({ {values.map((value) => ( onToggle(value)}> diff --git a/src/components/search/ResultItem.tsx b/src/components/search/ResultItem.tsx index 47c86ecc..0a910b7a 100644 --- a/src/components/search/ResultItem.tsx +++ b/src/components/search/ResultItem.tsx @@ -9,7 +9,7 @@ export const ResultItem = ({ result }: { result: TourType }) => { }; return (
{ />
-
{result.title}
+
{result.title}
{result.tourAddress} diff --git a/src/components/search/SearchInput.tsx b/src/components/search/SearchInput.tsx index c3dbbabf..0adedc1c 100644 --- a/src/components/search/SearchInput.tsx +++ b/src/components/search/SearchInput.tsx @@ -52,24 +52,26 @@ const SearchInput = () => {
-
- -
- - {inputValue && ( -
- +
+
+
- )} + + {inputValue && ( +
+ +
+ )} +
); diff --git a/src/components/search/StartSearchBtn.tsx b/src/components/search/StartSearchBtn.tsx index a5b9b3ef..0ec5b0f0 100644 --- a/src/components/search/StartSearchBtn.tsx +++ b/src/components/search/StartSearchBtn.tsx @@ -13,7 +13,7 @@ export const StartSearchButton = () => { className="flex h-[40px] w-full items-center border-b-2 border-solid px-1" onClick={goToSearch}> - 어디로 떠나세요? + 어디로 떠나세요? ); }; From 4809bcc13f04bc0fa6ffd18e5f8c17250f99bf6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=96=B4=EC=8A=B9=EC=A4=80?= Date: Thu, 25 Jan 2024 14:51:12 +0900 Subject: [PATCH 05/21] =?UTF-8?q?Fix:=20=EB=B9=8C=EB=93=9C=20=EC=97=90?= =?UTF-8?q?=EB=9F=AC=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Tours/ToursCategory.tsx | 1 - src/components/Tours/ToursCategoryItem.tsx | 2 -- src/components/Tours/ToursList.tsx | 1 - src/components/Wish/WishItem.tsx | 1 - src/components/Wish/WishList.tsx | 1 - src/components/search/ResultCategory.tsx | 1 - src/components/search/ResultItem.tsx | 1 - src/pages/plan/AddToTripPlan/OurLikedList.tsx | 1 - src/pages/plan/AddToTripPlan/OurLikedListItem.tsx | 1 - src/pages/plan/addToOurPlace/MyLikedList.tsx | 1 - src/pages/plan/addToOurPlace/MyLikedListItem.tsx | 1 - src/pages/plan/addToOurPlace/ResultCategoryPlan.tsx | 1 - src/pages/plan/addToOurPlace/ResultItem.tsx | 1 - 13 files changed, 14 deletions(-) diff --git a/src/components/Tours/ToursCategory.tsx b/src/components/Tours/ToursCategory.tsx index c7f72853..8042e180 100644 --- a/src/components/Tours/ToursCategory.tsx +++ b/src/components/Tours/ToursCategory.tsx @@ -1,4 +1,3 @@ -import { RegionTypes, ToursCategoryProps } from '@/@types/tours.types'; import ToursCategoryItem from './ToursCategoryItem'; import { getPopularRegion } from '@api/region'; import { Swiper, SwiperSlide } from 'swiper/react'; diff --git a/src/components/Tours/ToursCategoryItem.tsx b/src/components/Tours/ToursCategoryItem.tsx index f7e62cb3..f6a11688 100644 --- a/src/components/Tours/ToursCategoryItem.tsx +++ b/src/components/Tours/ToursCategoryItem.tsx @@ -1,5 +1,3 @@ -import { ToursCategoryItemProps } from '@/@types/tours.types'; - const ToursCategoryItem = ({ name, isSelected, diff --git a/src/components/Tours/ToursList.tsx b/src/components/Tours/ToursList.tsx index 45888808..5edc8611 100644 --- a/src/components/Tours/ToursList.tsx +++ b/src/components/Tours/ToursList.tsx @@ -1,4 +1,3 @@ -import { TourType, ToursListProps } from '@/@types/tours.types'; import { getTours } from '@api/tours'; import { useInfiniteQuery } from '@tanstack/react-query'; import React, { useEffect, useState } from 'react'; diff --git a/src/components/Wish/WishItem.tsx b/src/components/Wish/WishItem.tsx index 8a27f666..ffb1d665 100644 --- a/src/components/Wish/WishItem.tsx +++ b/src/components/Wish/WishItem.tsx @@ -1,4 +1,3 @@ -import { TourType } from '@/@types/tours.types'; import { HeartIcon, StarIcon } from '@components/common/icons/Icons'; import Like from '@components/common/like/Like'; import { useEffect, useState } from 'react'; diff --git a/src/components/Wish/WishList.tsx b/src/components/Wish/WishList.tsx index 45c2f717..c4fbb68d 100644 --- a/src/components/Wish/WishList.tsx +++ b/src/components/Wish/WishList.tsx @@ -3,7 +3,6 @@ import InfiniteScroll from 'react-infinite-scroller'; import { v4 as uuidv4 } from 'uuid'; import WishItem from './WishItem'; import ToursItemSkeleton from '@components/Tours/ToursItemSkeleton'; -import { TourType } from '@/@types/tours.types'; import { Spinner } from '@components/common/spinner/Spinner'; interface WishListProps { diff --git a/src/components/search/ResultCategory.tsx b/src/components/search/ResultCategory.tsx index e6447af1..3f321437 100644 --- a/src/components/search/ResultCategory.tsx +++ b/src/components/search/ResultCategory.tsx @@ -1,5 +1,4 @@ import { ButtonWhite } from '@components/common/button/Button'; -import { TourType } from '@/@types/tours.types'; import { InfiniteQueryObserverResult } from '@tanstack/react-query'; import { ResultItem } from './ResultItem'; diff --git a/src/components/search/ResultItem.tsx b/src/components/search/ResultItem.tsx index 47c86ecc..36785a4d 100644 --- a/src/components/search/ResultItem.tsx +++ b/src/components/search/ResultItem.tsx @@ -1,4 +1,3 @@ -import { TourType } from '@/@types/tours.types'; import { useNavigate } from 'react-router-dom'; export const ResultItem = ({ result }: { result: TourType }) => { diff --git a/src/pages/plan/AddToTripPlan/OurLikedList.tsx b/src/pages/plan/AddToTripPlan/OurLikedList.tsx index 76d48865..512ef578 100644 --- a/src/pages/plan/AddToTripPlan/OurLikedList.tsx +++ b/src/pages/plan/AddToTripPlan/OurLikedList.tsx @@ -2,7 +2,6 @@ import React from 'react'; import InfiniteScroll from 'react-infinite-scroller'; import { v4 as uuidv4 } from 'uuid'; import { OurLikedListItem } from './OurLikedListItem'; -import { LikedListType } from '@/@types/tours.types'; import { Spinner } from '@components/common/spinner/Spinner'; interface WishListProps { diff --git a/src/pages/plan/AddToTripPlan/OurLikedListItem.tsx b/src/pages/plan/AddToTripPlan/OurLikedListItem.tsx index 19a20840..3548e423 100644 --- a/src/pages/plan/AddToTripPlan/OurLikedListItem.tsx +++ b/src/pages/plan/AddToTripPlan/OurLikedListItem.tsx @@ -1,4 +1,3 @@ -import { LikedListType } from '@/@types/tours.types'; import { ListCheckBtn } from '@components/common/button/ListSelectBtn'; import { StarIcon } from '@components/common/icons/Icons'; import { selectedItemsState } from '@recoil/listItem'; diff --git a/src/pages/plan/addToOurPlace/MyLikedList.tsx b/src/pages/plan/addToOurPlace/MyLikedList.tsx index 6979f41a..c8acd8d7 100644 --- a/src/pages/plan/addToOurPlace/MyLikedList.tsx +++ b/src/pages/plan/addToOurPlace/MyLikedList.tsx @@ -2,7 +2,6 @@ import React from 'react'; import InfiniteScroll from 'react-infinite-scroller'; import { v4 as uuidv4 } from 'uuid'; import { MyLikedListItem } from './MyLikedListItem'; -import { TourType } from '@/@types/tours.types'; import { Spinner } from '@components/common/spinner/Spinner'; interface WishListProps { diff --git a/src/pages/plan/addToOurPlace/MyLikedListItem.tsx b/src/pages/plan/addToOurPlace/MyLikedListItem.tsx index 67628128..852b5ddd 100644 --- a/src/pages/plan/addToOurPlace/MyLikedListItem.tsx +++ b/src/pages/plan/addToOurPlace/MyLikedListItem.tsx @@ -1,4 +1,3 @@ -import { TourType } from '@/@types/tours.types'; import { ListCheckBtn } from '@components/common/button/ListSelectBtn'; import { StarIcon } from '@components/common/icons/Icons'; import { selectedItemsState } from '@recoil/listItem'; diff --git a/src/pages/plan/addToOurPlace/ResultCategoryPlan.tsx b/src/pages/plan/addToOurPlace/ResultCategoryPlan.tsx index b8988d18..e7fd80f2 100644 --- a/src/pages/plan/addToOurPlace/ResultCategoryPlan.tsx +++ b/src/pages/plan/addToOurPlace/ResultCategoryPlan.tsx @@ -1,5 +1,4 @@ import { ButtonWhite } from '@components/common/button/Button'; -import { TourType } from '@/@types/tours.types'; import { InfiniteQueryObserverResult } from '@tanstack/react-query'; import { ResultItemPlan } from './ResultItem'; import AddToListButton from './AddtoListBtn'; diff --git a/src/pages/plan/addToOurPlace/ResultItem.tsx b/src/pages/plan/addToOurPlace/ResultItem.tsx index 7d027aaa..9b99dc1e 100644 --- a/src/pages/plan/addToOurPlace/ResultItem.tsx +++ b/src/pages/plan/addToOurPlace/ResultItem.tsx @@ -1,4 +1,3 @@ -import { TourType } from '@/@types/tours.types'; import { ListSelectBtn } from '@components/common/button/ListSelectBtn'; import { StarIcon } from '@components/common/icons/Icons'; import { selectedItemsState } from '@recoil/listItem'; From bd1d50ffca70710882985e5ce8356c1fb3ef86d1 Mon Sep 17 00:00:00 2001 From: Shim Jeong ah <35457850+joanShim@users.noreply.github.com> Date: Thu, 25 Jan 2024 15:07:20 +0900 Subject: [PATCH 06/21] =?UTF-8?q?Fix:=20=EC=97=AC=ED=96=89=EC=A7=80=20?= =?UTF-8?q?=EA=B2=80=EC=83=89=20=EC=A7=80=EC=97=AD=20=ED=8C=8C=EB=9D=BC?= =?UTF-8?q?=EB=AF=B8=ED=84=B0=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/search/RegionSelect.tsx | 9 +++++---- src/constants.ts | 18 +++++++++--------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/components/search/RegionSelect.tsx b/src/components/search/RegionSelect.tsx index f0383b42..2a5c69ec 100644 --- a/src/components/search/RegionSelect.tsx +++ b/src/components/search/RegionSelect.tsx @@ -9,15 +9,16 @@ export const RegionSelect = ({}) => { const [selectedRegion, setSelectedRegion] = useState(''); // 지역값 쿼리스트링으로 저장 - const onRegionSelect = (value: string) => { + const onRegionSelect = (key: string) => { const queryParams = new URLSearchParams(location.search); + const value = AREA_CODE[key as keyof typeof AREA_CODE]; - if (value === selectedRegion) { + if (key === selectedRegion) { queryParams.delete('region'); setSelectedRegion(''); } else { queryParams.set('region', value); - setSelectedRegion(value); + setSelectedRegion(key); } navigate( @@ -30,6 +31,6 @@ export const RegionSelect = ({}) => { }; return ( - + ); }; diff --git a/src/constants.ts b/src/constants.ts index 37e408d4..c50f848b 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -6,14 +6,14 @@ export const AREA_CODE = { 광주: '광주', 대전: '대전', 울산: '울산', - 세종: '세종', + 세종: '세종특별자치시', 제주: '제주', - 경기: '경기', - 강원: '강원', - 충북: '충북', - 충남: '충남', - 경북: '경북', - 경남: '경남', - 전북: '전북', - 전남: '전남', + 경기: '경기도', + 강원: '강원도', + 충북: '충청북도', + 충남: '충청남도', + 경북: '경상북도', + 경남: '경상남도', + 전북: '전라북도', + 전남: '전라남도', }; From ab1fc67c1039878d1fb56a13f319570b6df9a614 Mon Sep 17 00:00:00 2001 From: Shim Jeong ah <35457850+joanShim@users.noreply.github.com> Date: Thu, 25 Jan 2024 15:11:06 +0900 Subject: [PATCH 07/21] =?UTF-8?q?Chore:=20=EC=95=88=EB=82=B4=20=EC=9B=8C?= =?UTF-8?q?=EB=94=A9=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Tours/CreateTripButton.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Tours/CreateTripButton.tsx b/src/components/Tours/CreateTripButton.tsx index 27026623..0cffb946 100644 --- a/src/components/Tours/CreateTripButton.tsx +++ b/src/components/Tours/CreateTripButton.tsx @@ -45,9 +45,9 @@ const CreateTripButton = () => { title={'로그인'} message={ <> - 로그인이 필요한 기능입니다. + 여정을 계획하려면 로그인이 필요해요.
- 로그인 하시겠습니까? + 로그인하러 가볼까요? } onConfirm={handleConfirm}> From eaf7e10e586be5f5e80720f303181b4169401179 Mon Sep 17 00:00:00 2001 From: NohWookJin Date: Thu, 25 Jan 2024 15:11:53 +0900 Subject: [PATCH 08/21] =?UTF-8?q?style:=20=EC=9C=84=EC=B9=98=20truncate=20?= =?UTF-8?q?=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DetailSectionTop/DetailToursMap.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/DetailSectionTop/DetailToursMap.tsx b/src/components/DetailSectionTop/DetailToursMap.tsx index 07871ac0..651433f4 100644 --- a/src/components/DetailSectionTop/DetailToursMap.tsx +++ b/src/components/DetailSectionTop/DetailToursMap.tsx @@ -42,7 +42,7 @@ export default function DetailToursMap({ mapData }: DetailToursMapProps) {
-

+

{fullAddress}

From 7ece2ebe1db5073d5c2495a79916f8a73f6a2454 Mon Sep 17 00:00:00 2001 From: NohWookJin Date: Thu, 25 Jan 2024 15:12:31 +0900 Subject: [PATCH 09/21] =?UTF-8?q?refactor:=20=EA=B0=92=20=EC=97=86?= =?UTF-8?q?=EC=9D=84=EC=8B=9C=20null=20=EB=B0=98=ED=99=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/MyTrip/MyTripAfterList.tsx | 28 +++++++++++++---------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/components/MyTrip/MyTripAfterList.tsx b/src/components/MyTrip/MyTripAfterList.tsx index ec33c2de..3afc4806 100644 --- a/src/components/MyTrip/MyTripAfterList.tsx +++ b/src/components/MyTrip/MyTripAfterList.tsx @@ -17,18 +17,22 @@ const MyTripAfterList: React.FC = ({ myTripsData }) => { new Date(a.startDate).getTime() - new Date(b.startDate).getTime(), ); - return ( - <> -
-

지난 여행

-
-
- {sortedTrips.map((myTripList: MyTripType) => ( - - ))} -
- - ); + if (sortedTrips.length > 0) { + return ( + <> +
+

지난 여행

+
+
+ {sortedTrips.map((myTripList: MyTripType) => ( + + ))} +
+ + ); + } else { + return null; + } }; export default MyTripAfterList; From 66abdbea22ac3d40330b1c9225f7b4fbb2970a2e Mon Sep 17 00:00:00 2001 From: NohWookJin Date: Thu, 25 Jan 2024 15:13:01 +0900 Subject: [PATCH 10/21] =?UTF-8?q?style:=20=EC=9B=8C=EB=94=A9=20qa=20?= =?UTF-8?q?=EA=B8=B0=EB=B0=98=20=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/MyTrip/MyTrip.tsx | 2 +- src/components/Trip/LikedToursList.tsx | 63 ++++++++++++++++++++------ src/components/Wish/Wish.tsx | 2 +- src/components/common/like/Like.tsx | 4 +- src/components/common/nav/Nav.tsx | 8 ++-- 5 files changed, 58 insertions(+), 21 deletions(-) diff --git a/src/components/MyTrip/MyTrip.tsx b/src/components/MyTrip/MyTrip.tsx index ae8ed92e..13ade56e 100644 --- a/src/components/MyTrip/MyTrip.tsx +++ b/src/components/MyTrip/MyTrip.tsx @@ -42,7 +42,7 @@ const MyTrip = () => { ) : ( } /> diff --git a/src/components/Trip/LikedToursList.tsx b/src/components/Trip/LikedToursList.tsx index c2b4e969..407e398a 100644 --- a/src/components/Trip/LikedToursList.tsx +++ b/src/components/Trip/LikedToursList.tsx @@ -1,4 +1,4 @@ -import { useState } from 'react'; +import { useEffect, useState } from 'react'; import { useNavigate, useParams } from 'react-router-dom'; import { useInfiniteQuery } from '@tanstack/react-query'; @@ -8,8 +8,10 @@ import NoDataMessage from '@components/common/noData/NoDataMessage'; import { getTripsLike } from '@api/trips'; import { HeartIcon, NewIcon } from '@components/common/icons/Icons'; +import Alert from '@components/common/alert/Alert'; export const LikedToursList = () => { + const [isLoggedIn, setIsLoggedIn] = useState(false); const [selectedContentTypeId, setSelectedContentTypeId] = useState< null | number >(null); @@ -18,7 +20,7 @@ export const LikedToursList = () => { const { id: tripId } = useParams(); if (!tripId) { - return; + return null; } const { fetchNextPage, hasNextPage, data, isLoading, error } = @@ -52,6 +54,19 @@ export const LikedToursList = () => { setSelectedContentTypeId(contentTypeId); }; + const handleConfirm = () => { + navigate('/login'); + }; + + useEffect(() => { + const token = window.localStorage.getItem('accessToken'); + if (token) { + setIsLoggedIn(true); + } else { + setIsLoggedIn(false); + } + }, []); + return (
@@ -70,7 +85,7 @@ export const LikedToursList = () => { ) : (
} /> @@ -78,16 +93,38 @@ export const LikedToursList = () => { )} {/* 우리의 관심 여행지 추가 버튼 => 검색 라우터 이동 */} -
- -
+ {isLoggedIn ? ( +
+ +
+ ) : ( + + 관심 여행지를 추가하려면 로그인이 필요해요. +
+ 로그인하러 가볼까요? + + } + onConfirm={handleConfirm}> +
+ +
+
+ )}
); }; diff --git a/src/components/Wish/Wish.tsx b/src/components/Wish/Wish.tsx index 11c5d8ef..8554eab4 100644 --- a/src/components/Wish/Wish.tsx +++ b/src/components/Wish/Wish.tsx @@ -60,7 +60,7 @@ const Wish = () => { /> ) : ( } /> diff --git a/src/components/common/like/Like.tsx b/src/components/common/like/Like.tsx index 159bf56d..8ab6504c 100644 --- a/src/components/common/like/Like.tsx +++ b/src/components/common/like/Like.tsx @@ -75,9 +75,9 @@ const Like = ({ liked, id }: LikeProps) => { title={'로그인'} message={ <> - 관심 목록 등록시 로그인이 필요합니다. + 관심 여행지를 추가하려면 로그인이 필요해요.
- 로그인 하시겠습니까? + 로그인하러 가볼까요? } onConfirm={handleConfirm} diff --git a/src/components/common/nav/Nav.tsx b/src/components/common/nav/Nav.tsx index c26329ac..912da64f 100644 --- a/src/components/common/nav/Nav.tsx +++ b/src/components/common/nav/Nav.tsx @@ -66,9 +66,9 @@ const Nav = () => { title={'로그인'} message={ <> - 나의 여정 조회를 위해 로그인이 필요합니다. + 여정을 관리하려면 로그인이 필요해요.
- 로그인 하시겠습니까? + 로그인하러 가볼까요? } onConfirm={handleConfirm}> @@ -105,9 +105,9 @@ const Nav = () => { title={'로그인'} message={ <> - 관심 목록 조회를 위해 로그인이 필요합니다. + 관심 여행지를 관리하려면 로그인이 필요해요.
- 로그인 하시겠습니까? + 로그인하러 가볼까요? } onConfirm={handleConfirm}> From f83cd5ef62aadc6a87daa945c920c0a5ccbb083d Mon Sep 17 00:00:00 2001 From: NohWookJin Date: Thu, 25 Jan 2024 15:14:37 +0900 Subject: [PATCH 11/21] =?UTF-8?q?style:=20=EC=8D=B8=EB=84=A4=EC=9D=BC=20?= =?UTF-8?q?=EB=AA=A8=EC=96=91=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/MyTrip/MyTripIngItem.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/MyTrip/MyTripIngItem.tsx b/src/components/MyTrip/MyTripIngItem.tsx index ca0d08d4..2ac15a77 100644 --- a/src/components/MyTrip/MyTripIngItem.tsx +++ b/src/components/MyTrip/MyTripIngItem.tsx @@ -19,7 +19,7 @@ const MyTripIngItem: React.FC = ({ myTripList }) => {
여행지 이미지 From acce36a14486302d7dc120b46c90aafb468ae612 Mon Sep 17 00:00:00 2001 From: Shim Jeong ah <35457850+joanShim@users.noreply.github.com> Date: Thu, 25 Jan 2024 15:16:19 +0900 Subject: [PATCH 12/21] =?UTF-8?q?Fix:=20=EC=98=A4=ED=86=A0=ED=8F=AC?= =?UTF-8?q?=EC=BB=A4=EC=8A=A4=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plan => components/addToList}/AddToTripPlan/OurLiked.tsx | 0 .../addToList}/AddToTripPlan/OurLikedList.tsx | 0 .../addToList}/AddToTripPlan/OurLikedListItem.tsx | 0 .../addToList}/addToOurPlace/AddtoListBtn.tsx | 0 .../plan => components/addToList}/addToOurPlace/MyLiked.tsx | 0 .../addToList}/addToOurPlace/MyLikedList.tsx | 0 .../addToList}/addToOurPlace/MyLikedListItem.tsx | 0 .../addToList}/addToOurPlace/PlanAddPlace.page.tsx | 0 .../addToList}/addToOurPlace/ResultCategoryPlan.tsx | 0 .../addToList}/addToOurPlace/ResultItem.tsx | 0 .../addToList}/addToOurPlace/SearchResult.tsx | 0 src/pages/create/createTrip.page.tsx | 1 - src/pages/trip/AddOurList.page.tsx | 4 ++-- src/router/socketRouter.tsx | 2 +- 14 files changed, 3 insertions(+), 4 deletions(-) rename src/{pages/plan => components/addToList}/AddToTripPlan/OurLiked.tsx (100%) rename src/{pages/plan => components/addToList}/AddToTripPlan/OurLikedList.tsx (100%) rename src/{pages/plan => components/addToList}/AddToTripPlan/OurLikedListItem.tsx (100%) rename src/{pages/plan => components/addToList}/addToOurPlace/AddtoListBtn.tsx (100%) rename src/{pages/plan => components/addToList}/addToOurPlace/MyLiked.tsx (100%) rename src/{pages/plan => components/addToList}/addToOurPlace/MyLikedList.tsx (100%) rename src/{pages/plan => components/addToList}/addToOurPlace/MyLikedListItem.tsx (100%) rename src/{pages/plan => components/addToList}/addToOurPlace/PlanAddPlace.page.tsx (100%) rename src/{pages/plan => components/addToList}/addToOurPlace/ResultCategoryPlan.tsx (100%) rename src/{pages/plan => components/addToList}/addToOurPlace/ResultItem.tsx (100%) rename src/{pages/plan => components/addToList}/addToOurPlace/SearchResult.tsx (100%) diff --git a/src/pages/plan/AddToTripPlan/OurLiked.tsx b/src/components/addToList/AddToTripPlan/OurLiked.tsx similarity index 100% rename from src/pages/plan/AddToTripPlan/OurLiked.tsx rename to src/components/addToList/AddToTripPlan/OurLiked.tsx diff --git a/src/pages/plan/AddToTripPlan/OurLikedList.tsx b/src/components/addToList/AddToTripPlan/OurLikedList.tsx similarity index 100% rename from src/pages/plan/AddToTripPlan/OurLikedList.tsx rename to src/components/addToList/AddToTripPlan/OurLikedList.tsx diff --git a/src/pages/plan/AddToTripPlan/OurLikedListItem.tsx b/src/components/addToList/AddToTripPlan/OurLikedListItem.tsx similarity index 100% rename from src/pages/plan/AddToTripPlan/OurLikedListItem.tsx rename to src/components/addToList/AddToTripPlan/OurLikedListItem.tsx diff --git a/src/pages/plan/addToOurPlace/AddtoListBtn.tsx b/src/components/addToList/addToOurPlace/AddtoListBtn.tsx similarity index 100% rename from src/pages/plan/addToOurPlace/AddtoListBtn.tsx rename to src/components/addToList/addToOurPlace/AddtoListBtn.tsx diff --git a/src/pages/plan/addToOurPlace/MyLiked.tsx b/src/components/addToList/addToOurPlace/MyLiked.tsx similarity index 100% rename from src/pages/plan/addToOurPlace/MyLiked.tsx rename to src/components/addToList/addToOurPlace/MyLiked.tsx diff --git a/src/pages/plan/addToOurPlace/MyLikedList.tsx b/src/components/addToList/addToOurPlace/MyLikedList.tsx similarity index 100% rename from src/pages/plan/addToOurPlace/MyLikedList.tsx rename to src/components/addToList/addToOurPlace/MyLikedList.tsx diff --git a/src/pages/plan/addToOurPlace/MyLikedListItem.tsx b/src/components/addToList/addToOurPlace/MyLikedListItem.tsx similarity index 100% rename from src/pages/plan/addToOurPlace/MyLikedListItem.tsx rename to src/components/addToList/addToOurPlace/MyLikedListItem.tsx diff --git a/src/pages/plan/addToOurPlace/PlanAddPlace.page.tsx b/src/components/addToList/addToOurPlace/PlanAddPlace.page.tsx similarity index 100% rename from src/pages/plan/addToOurPlace/PlanAddPlace.page.tsx rename to src/components/addToList/addToOurPlace/PlanAddPlace.page.tsx diff --git a/src/pages/plan/addToOurPlace/ResultCategoryPlan.tsx b/src/components/addToList/addToOurPlace/ResultCategoryPlan.tsx similarity index 100% rename from src/pages/plan/addToOurPlace/ResultCategoryPlan.tsx rename to src/components/addToList/addToOurPlace/ResultCategoryPlan.tsx diff --git a/src/pages/plan/addToOurPlace/ResultItem.tsx b/src/components/addToList/addToOurPlace/ResultItem.tsx similarity index 100% rename from src/pages/plan/addToOurPlace/ResultItem.tsx rename to src/components/addToList/addToOurPlace/ResultItem.tsx diff --git a/src/pages/plan/addToOurPlace/SearchResult.tsx b/src/components/addToList/addToOurPlace/SearchResult.tsx similarity index 100% rename from src/pages/plan/addToOurPlace/SearchResult.tsx rename to src/components/addToList/addToOurPlace/SearchResult.tsx diff --git a/src/pages/create/createTrip.page.tsx b/src/pages/create/createTrip.page.tsx index acaf0422..09a65f51 100644 --- a/src/pages/create/createTrip.page.tsx +++ b/src/pages/create/createTrip.page.tsx @@ -102,7 +102,6 @@ export const CreateTrip = () => { onChange={(e) => { setTitle(e.target.value); }} - autoFocus /> {title && (
Date: Thu, 25 Jan 2024 15:16:41 +0900 Subject: [PATCH 13/21] =?UTF-8?q?style:=20=EA=B8=B0=ED=98=B8=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/MyTrip/MyTripIngItem.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/MyTrip/MyTripIngItem.tsx b/src/components/MyTrip/MyTripIngItem.tsx index 2ac15a77..a18c33da 100644 --- a/src/components/MyTrip/MyTripIngItem.tsx +++ b/src/components/MyTrip/MyTripIngItem.tsx @@ -36,7 +36,7 @@ const MyTripIngItem: React.FC = ({ myTripList }) => {
- {startDate.replace(/-/g, '.')} ~{' '} + {startDate.replace(/-/g, '.')} -{' '} {endDate.replace(/-/g, '.').split('2024.')}{' '} {tripDuration === '0박 1일' ? null : ` (${tripDuration})`}
From 4b2425e8e86fb96eff803957ab08defcff061101 Mon Sep 17 00:00:00 2001 From: Shim Jeong ah <35457850+joanShim@users.noreply.github.com> Date: Thu, 25 Jan 2024 15:53:44 +0900 Subject: [PATCH 14/21] =?UTF-8?q?Design:=20=EA=B2=80=EC=83=89=EB=B2=84?= =?UTF-8?q?=ED=8A=BC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/search/StartSearchBtn.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/search/StartSearchBtn.tsx b/src/components/search/StartSearchBtn.tsx index 0ec5b0f0..000b3d30 100644 --- a/src/components/search/StartSearchBtn.tsx +++ b/src/components/search/StartSearchBtn.tsx @@ -1,5 +1,5 @@ import { useNavigate } from 'react-router-dom'; -import { ReactComponent as SearchIcon } from '@assets/images/Search.svg'; +import { SearchIcon } from '@components/common/icons/Icons'; export const StartSearchButton = () => { const navigate = useNavigate(); @@ -10,10 +10,10 @@ export const StartSearchButton = () => { return ( ); }; From 5a85a7afab94fd4221594a909da90753c3092161 Mon Sep 17 00:00:00 2001 From: Hojin Date: Thu, 25 Jan 2024 16:23:19 +0900 Subject: [PATCH 15/21] =?UTF-8?q?Feat:=20=EC=9D=BC=EC=A0=95=EC=9D=B4=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80=EB=90=98=EC=97=88=EC=96=B4=EC=9A=94=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DetailSectionTop/DetailAddSchedule.tsx | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/components/DetailSectionTop/DetailAddSchedule.tsx b/src/components/DetailSectionTop/DetailAddSchedule.tsx index 6f32843d..a66d8913 100644 --- a/src/components/DetailSectionTop/DetailAddSchedule.tsx +++ b/src/components/DetailSectionTop/DetailAddSchedule.tsx @@ -11,6 +11,7 @@ import { useState, useEffect } from 'react'; import { postTripsItem } from '@api/trips'; import { useParams } from 'react-router-dom'; import { Swiper, SwiperSlide } from 'swiper/react'; +import ToastPopUp from '@components/common/toastpopup/ToastPopUp'; const DetailAddSchedule = () => { const token = localStorage.getItem('accessToken'); @@ -30,6 +31,12 @@ const DetailAddSchedule = () => { (trip) => trip.tripStatus !== '여행완료', ); + const [toastPopUp, setToastPopUp] = useState({ + isPopUp: false, + noun: '', + verb: '', + }); + const handleNavigate = (url: string) => { navigate(url); }; @@ -63,6 +70,11 @@ const DetailAddSchedule = () => { } catch (error) { console.error('요청 실패:', error); } finally { + setToastPopUp(() => ({ + isPopUp: true, + noun: '일정', + verb: '추가', + })); setIsProcessing(false); } } @@ -79,8 +91,24 @@ const DetailAddSchedule = () => { } }, [isOpen]); + useEffect(() => { + if (toastPopUp.isPopUp) { + const timer = setTimeout(() => { + setToastPopUp(() => ({ + isPopUp: false, + noun: '', + verb: '', + })); + }, 2000); + return () => clearTimeout(timer); + } + }, [toastPopUp]); + return ( <> + {toastPopUp.isPopUp && ( + + )} {token ? ( From 487674bdeb1668c1bc2dd9a877b4089e354f3873 Mon Sep 17 00:00:00 2001 From: NohWookJin Date: Thu, 25 Jan 2024 16:28:51 +0900 Subject: [PATCH 16/21] =?UTF-8?q?style:=20=EB=94=94=EC=9E=90=EC=9D=B8=20qa?= =?UTF-8?q?=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DetailSectionTop/DetailAddSchedule.tsx | 8 +- .../DetailSectionTop/DetailToursButtons.tsx | 4 +- .../DetailSectionTop/DetailToursInfo.tsx | 6 +- .../DetailSectionTop/DetailToursMap.tsx | 2 +- .../DetailSectionTop/DetailToursRating.tsx | 6 +- src/components/Wish/WishCategory.tsx | 4 +- src/components/Wish/WishCategoryItem.tsx | 2 +- src/components/Wish/WishItem.tsx | 6 +- src/components/common/header/DetailHeader.tsx | 2 +- src/components/common/icons/Icons.tsx | 104 ++++-------------- 10 files changed, 38 insertions(+), 106 deletions(-) diff --git a/src/components/DetailSectionTop/DetailAddSchedule.tsx b/src/components/DetailSectionTop/DetailAddSchedule.tsx index 6f32843d..7605494e 100644 --- a/src/components/DetailSectionTop/DetailAddSchedule.tsx +++ b/src/components/DetailSectionTop/DetailAddSchedule.tsx @@ -85,8 +85,8 @@ const DetailAddSchedule = () => { @@ -244,8 +244,8 @@ const DetailAddSchedule = () => { } onConfirm={() => handleNavigate('/login')}> )} diff --git a/src/components/DetailSectionTop/DetailToursButtons.tsx b/src/components/DetailSectionTop/DetailToursButtons.tsx index 49de97fb..d25e517d 100644 --- a/src/components/DetailSectionTop/DetailToursButtons.tsx +++ b/src/components/DetailSectionTop/DetailToursButtons.tsx @@ -48,8 +48,8 @@ export default function DetailTourButtons({
diff --git a/src/components/DetailSectionTop/DetailToursInfo.tsx b/src/components/DetailSectionTop/DetailToursInfo.tsx index 8af2a5ee..7b3eaba3 100644 --- a/src/components/DetailSectionTop/DetailToursInfo.tsx +++ b/src/components/DetailSectionTop/DetailToursInfo.tsx @@ -9,7 +9,7 @@ export default function DetailToursInfo({ infoData }: DetailToursInfoProps) { return ( <> -
+
tour-image
-

- {title} -

+

{title}

diff --git a/src/components/DetailSectionTop/DetailToursMap.tsx b/src/components/DetailSectionTop/DetailToursMap.tsx index 651433f4..7bec6bc9 100644 --- a/src/components/DetailSectionTop/DetailToursMap.tsx +++ b/src/components/DetailSectionTop/DetailToursMap.tsx @@ -17,7 +17,7 @@ export default function DetailToursMap({ mapData }: DetailToursMapProps) { const MapStyle = { width: '100%', - height: '180px', + height: '160px', marginTop: '5px', marginBottom: '15px', }; diff --git a/src/components/DetailSectionTop/DetailToursRating.tsx b/src/components/DetailSectionTop/DetailToursRating.tsx index d92303d2..4f10b83d 100644 --- a/src/components/DetailSectionTop/DetailToursRating.tsx +++ b/src/components/DetailSectionTop/DetailToursRating.tsx @@ -44,7 +44,7 @@ export default function DetailToursRating({
{STAR_IDX_ARR.map((item, idx) => { return ( - + ); })} -
-

+

+

({reviewTotalCount})

diff --git a/src/components/Wish/WishCategory.tsx b/src/components/Wish/WishCategory.tsx index c288671b..a97b89ad 100644 --- a/src/components/Wish/WishCategory.tsx +++ b/src/components/Wish/WishCategory.tsx @@ -10,9 +10,9 @@ const WishCategory: React.FC = ({ onCategoryClick }) => { const categories = [ { code: null, name: '전체' }, - { code: 12, name: '관광지' }, { code: 32, name: '숙소' }, { code: 39, name: '식당' }, + { code: 12, name: '관광지' }, ]; const handleSelectCategory = (name: string) => { @@ -25,7 +25,7 @@ const WishCategory: React.FC = ({ onCategoryClick }) => { }; return ( -
+
{categories.map((category) => { return ( = ({ return ( ); diff --git a/src/components/Wish/WishItem.tsx b/src/components/Wish/WishItem.tsx index 8a27f666..1589ba30 100644 --- a/src/components/Wish/WishItem.tsx +++ b/src/components/Wish/WishItem.tsx @@ -33,12 +33,12 @@ const WishItem: React.FC = ({ wishList }) => { return (
navigate(`/detail/${id}`)}>
여행지 이미지 @@ -48,7 +48,7 @@ const WishItem: React.FC = ({ wishList }) => {
-
+

{title}

diff --git a/src/components/common/header/DetailHeader.tsx b/src/components/common/header/DetailHeader.tsx index c008416d..2350511d 100644 --- a/src/components/common/header/DetailHeader.tsx +++ b/src/components/common/header/DetailHeader.tsx @@ -13,7 +13,7 @@ export default function DetailHeader() { }; return ( -
+
diff --git a/src/components/common/icons/Icons.tsx b/src/components/common/icons/Icons.tsx index a33a26b2..13f9428f 100644 --- a/src/components/common/icons/Icons.tsx +++ b/src/components/common/icons/Icons.tsx @@ -34,7 +34,7 @@ export const HomeIcon: React.FC = ({ }; export const CalendarIcon: React.FC = ({ - size = 25, + size = 20, color = 'black', fill = 'none', className, @@ -44,77 +44,14 @@ export const CalendarIcon: React.FC = ({ xmlns="http://www.w3.org/2000/svg" width={size} height={size} - className={className} - viewBox="0 0 25 25" - fill={fill}> - - - - - - - - - + viewBox="0 0 21 21" + color={color} + fill={fill} + className={className}> @@ -342,7 +279,7 @@ export const MapIcon: React.FC = ({ }; export const PenIcon: React.FC = ({ - size = 25, + size = 20, color = 'black', fill = 'none', className, @@ -386,24 +323,21 @@ export const PenIcon: React.FC = ({ }; export const PhoneIcon: React.FC = ({ - size = 25, - color = 'black', - fill = 'none', + size = 20, + color = '#888888', + fill = '#888888', }) => { return ( - - - + viewBox="0 0 21 21" + fill={fill}> + ); }; From 62bfb61872d2c2cd86bb6b83bfdd8538acb52429 Mon Sep 17 00:00:00 2001 From: NohWookJin Date: Thu, 25 Jan 2024 16:40:46 +0900 Subject: [PATCH 17/21] =?UTF-8?q?style:=20nav=20=EC=8B=A0=EA=B7=9C=20?= =?UTF-8?q?=EB=94=94=EC=9E=90=EC=9D=B8=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/common/nav/Nav.tsx | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/src/components/common/nav/Nav.tsx b/src/components/common/nav/Nav.tsx index 912da64f..e0b3e51c 100644 --- a/src/components/common/nav/Nav.tsx +++ b/src/components/common/nav/Nav.tsx @@ -1,6 +1,6 @@ import { useLocation, useNavigate } from 'react-router-dom'; import { - CalendarIcon, + CalendarIcon3, CalendarIcon2, HeartIcon, HomeIcon, @@ -45,7 +45,9 @@ const Nav = () => { fill={isActive('/') ? 'currentColor' : 'none'} />
-

+

+ 홈 +

{isLoggedIn ? ( @@ -56,10 +58,12 @@ const Nav = () => { {isActive('/mytrip') ? ( ) : ( - + )}
-

여정

+

+ 일정 +

) : ( { onConfirm={handleConfirm}>
-
-

- 여정 +

+ 일정

@@ -96,7 +100,7 @@ const Nav = () => { fill={isActive('/wishlist') ? 'currentColor' : 'none'} />
-

+

관심목록

@@ -118,7 +122,7 @@ const Nav = () => { fill={isActive('/wishlist') ? 'currentColor' : 'none'} />
-

+

관심목록

@@ -134,7 +138,9 @@ const Nav = () => { fill={isActive('/mypage') ? 'currentColor' : 'none'} />
-

내정보

+

+ 내정보 +

From 594822a1bcea7080fa23323182426f278402fbc1 Mon Sep 17 00:00:00 2001 From: NohWookJin Date: Thu, 25 Jan 2024 16:40:59 +0900 Subject: [PATCH 18/21] =?UTF-8?q?style:=20=EB=94=94=EC=9E=90=EC=9D=B8=20qa?= =?UTF-8?q?=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LikedToursListCategory.tsx | 4 +- .../LikedToursListCategoryItem.tsx | 2 +- .../LikedToursLists/LikedToursListItem.tsx | 4 +- src/components/common/icons/Icons.tsx | 89 +++++++++++++++++++ 4 files changed, 94 insertions(+), 5 deletions(-) diff --git a/src/components/Trip/LikedToursLists/LikedToursListCategory.tsx b/src/components/Trip/LikedToursLists/LikedToursListCategory.tsx index 8a243c2f..8e78be04 100644 --- a/src/components/Trip/LikedToursLists/LikedToursListCategory.tsx +++ b/src/components/Trip/LikedToursLists/LikedToursListCategory.tsx @@ -12,9 +12,9 @@ const LikedToursListCategory: React.FC = ({ const categories = [ { code: null, name: '전체' }, - { code: 12, name: '관광지' }, { code: 32, name: '숙소' }, { code: 39, name: '식당' }, + { code: 12, name: '관광지' }, ]; const handleSelectCategory = (name: string) => { @@ -27,7 +27,7 @@ const LikedToursListCategory: React.FC = ({ }; return ( -
+
{categories.map((category) => { return ( + className={`body4 mr-[8px] flex h-[32px] w-[58px] items-center justify-center whitespace-nowrap rounded-[30px] border border-solid bg-[#28D8FF] px-[16px] py-[7px] leading-normal ${buttonStyle}`}> {category.name} ); diff --git a/src/components/Trip/LikedToursLists/LikedToursListItem.tsx b/src/components/Trip/LikedToursLists/LikedToursListItem.tsx index 9f7e72a5..1a49bd58 100644 --- a/src/components/Trip/LikedToursLists/LikedToursListItem.tsx +++ b/src/components/Trip/LikedToursLists/LikedToursListItem.tsx @@ -72,12 +72,12 @@ const LikedToursListItem: React.FC = ({ return (
navigate(`/detail/${tourItemId}`)}>
여행지 이미지 diff --git a/src/components/common/icons/Icons.tsx b/src/components/common/icons/Icons.tsx index 13f9428f..ac991698 100644 --- a/src/components/common/icons/Icons.tsx +++ b/src/components/common/icons/Icons.tsx @@ -133,6 +133,95 @@ export const CalendarIcon2: React.FC = ({ size = 25 }) => { ); }; +export const CalendarIcon3: React.FC = ({ + size = 25, + color = 'black', + fill = 'none', + className, +}) => { + return ( + + + + + + + + + + + + + ); +}; + export const HeartIcon: React.FC = ({ size = 25, color = 'black', From da052d1358575a2eb9811ad6b412fe93f7ec7595 Mon Sep 17 00:00:00 2001 From: NohWookJin Date: Thu, 25 Jan 2024 16:44:16 +0900 Subject: [PATCH 19/21] =?UTF-8?q?style:=20=ED=8F=B0=ED=8A=B8=20=EC=BD=94?= =?UTF-8?q?=EB=93=9C=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Trip/LikedToursLists/LikedToursListItem.tsx | 2 +- src/components/Wish/WishItem.tsx | 4 ++-- src/components/common/noData/NoDataMessage.tsx | 8 ++------ 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/components/Trip/LikedToursLists/LikedToursListItem.tsx b/src/components/Trip/LikedToursLists/LikedToursListItem.tsx index 1a49bd58..4d4c7e85 100644 --- a/src/components/Trip/LikedToursLists/LikedToursListItem.tsx +++ b/src/components/Trip/LikedToursLists/LikedToursListItem.tsx @@ -85,7 +85,7 @@ const LikedToursListItem: React.FC = ({
-

+

{title}

diff --git a/src/components/Wish/WishItem.tsx b/src/components/Wish/WishItem.tsx index 1589ba30..2dc9eb98 100644 --- a/src/components/Wish/WishItem.tsx +++ b/src/components/Wish/WishItem.tsx @@ -49,7 +49,7 @@ const WishItem: React.FC = ({ wishList }) => {
-

+

{title}

@@ -58,7 +58,7 @@ const WishItem: React.FC = ({ wishList }) => { ? (tourAddress.match(/(.*?[시군구])/)?.[0] || '') + (tourAddress .replace(/(.*?[시군구])/, '') - .match(/(특별시|광역시)?.*?[시군구]/)?.[0] || '') + .match(/(특별`시|광역시)?.*?[시군구]/)?.[0] || '') : tourAddress?.match(/(.*?[시군구])/)?.[0]}

diff --git a/src/components/common/noData/NoDataMessage.tsx b/src/components/common/noData/NoDataMessage.tsx index 6e15c2d2..cab01453 100644 --- a/src/components/common/noData/NoDataMessage.tsx +++ b/src/components/common/noData/NoDataMessage.tsx @@ -15,13 +15,9 @@ const NoDataMessage: React.FC = ({
{icon}
-
- {message1} -
+
{message1}
-
- {message2} -
+
{message2}
From abc82a7a6e073142326a9d7b4843eee6042dea1b Mon Sep 17 00:00:00 2001 From: NohWookJin Date: Thu, 25 Jan 2024 17:04:47 +0900 Subject: [PATCH 20/21] =?UTF-8?q?style:=20=EB=94=94=EC=9E=90=EC=9D=B8=20qa?= =?UTF-8?q?=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Trip/LikedToursList.tsx | 2 +- src/components/Trip/LikedToursLists/LikedToursListItem.tsx | 2 +- src/components/Wish/Wish.tsx | 2 +- src/components/Wish/WishCategory.tsx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/Trip/LikedToursList.tsx b/src/components/Trip/LikedToursList.tsx index 407e398a..9fa49f59 100644 --- a/src/components/Trip/LikedToursList.tsx +++ b/src/components/Trip/LikedToursList.tsx @@ -68,7 +68,7 @@ export const LikedToursList = () => { }, []); return ( -
+
{data?.pages[0].data.content.length > 0 ? ( diff --git a/src/components/Trip/LikedToursLists/LikedToursListItem.tsx b/src/components/Trip/LikedToursLists/LikedToursListItem.tsx index 4d4c7e85..c9e73827 100644 --- a/src/components/Trip/LikedToursLists/LikedToursListItem.tsx +++ b/src/components/Trip/LikedToursLists/LikedToursListItem.tsx @@ -85,7 +85,7 @@ const LikedToursListItem: React.FC = ({
-

+

{title}

diff --git a/src/components/Wish/Wish.tsx b/src/components/Wish/Wish.tsx index 8554eab4..560a700a 100644 --- a/src/components/Wish/Wish.tsx +++ b/src/components/Wish/Wish.tsx @@ -44,7 +44,7 @@ const Wish = () => { } return ( -
+

나의 관심 목록

diff --git a/src/components/Wish/WishCategory.tsx b/src/components/Wish/WishCategory.tsx index a97b89ad..7e9d55af 100644 --- a/src/components/Wish/WishCategory.tsx +++ b/src/components/Wish/WishCategory.tsx @@ -25,7 +25,7 @@ const WishCategory: React.FC = ({ onCategoryClick }) => { }; return ( -
+
{categories.map((category) => { return ( Date: Thu, 25 Jan 2024 17:15:52 +0900 Subject: [PATCH 21/21] =?UTF-8?q?style:=20=EC=97=AC=EC=A0=95=20=EB=94=94?= =?UTF-8?q?=EC=9E=90=EC=9D=B8=20qa?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/MyTrip/MyTrip.tsx | 2 +- src/components/MyTrip/MyTripAfterList.tsx | 4 ++-- src/components/MyTrip/MyTripBeforeList.tsx | 4 ++-- src/components/MyTrip/MyTripIngItem.tsx | 6 +++--- src/components/MyTrip/MyTripItem.tsx | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/components/MyTrip/MyTrip.tsx b/src/components/MyTrip/MyTrip.tsx index 13ade56e..c80f12fc 100644 --- a/src/components/MyTrip/MyTrip.tsx +++ b/src/components/MyTrip/MyTrip.tsx @@ -32,7 +32,7 @@ const MyTrip = () => { return (
-

나의 여정

+

나의 여정

{data.length > 0 ? ( <> diff --git a/src/components/MyTrip/MyTripAfterList.tsx b/src/components/MyTrip/MyTripAfterList.tsx index 3afc4806..c5d65cb4 100644 --- a/src/components/MyTrip/MyTripAfterList.tsx +++ b/src/components/MyTrip/MyTripAfterList.tsx @@ -20,8 +20,8 @@ const MyTripAfterList: React.FC = ({ myTripsData }) => { if (sortedTrips.length > 0) { return ( <> -
-

지난 여행

+
+

지난 여행

{sortedTrips.map((myTripList: MyTripType) => ( diff --git a/src/components/MyTrip/MyTripBeforeList.tsx b/src/components/MyTrip/MyTripBeforeList.tsx index e4d27037..88dc770f 100644 --- a/src/components/MyTrip/MyTripBeforeList.tsx +++ b/src/components/MyTrip/MyTripBeforeList.tsx @@ -14,8 +14,8 @@ const MyTripBeforeList: React.FC = ({ myTripsData }) => { return ( <> -
-

다가오는 여행

+
+

다가오는 여행

{myTripsData.map((myTripList: MyTripType) => ( diff --git a/src/components/MyTrip/MyTripIngItem.tsx b/src/components/MyTrip/MyTripIngItem.tsx index a18c33da..e054b93f 100644 --- a/src/components/MyTrip/MyTripIngItem.tsx +++ b/src/components/MyTrip/MyTripIngItem.tsx @@ -30,12 +30,12 @@ const MyTripIngItem: React.FC = ({ myTripList }) => {
-
-
+
+
{tripName}
-
+
{startDate.replace(/-/g, '.')} -{' '} {endDate.replace(/-/g, '.').split('2024.')}{' '} {tripDuration === '0박 1일' ? null : ` (${tripDuration})`} diff --git a/src/components/MyTrip/MyTripItem.tsx b/src/components/MyTrip/MyTripItem.tsx index 72375a66..7776541d 100644 --- a/src/components/MyTrip/MyTripItem.tsx +++ b/src/components/MyTrip/MyTripItem.tsx @@ -66,10 +66,10 @@ const MyTripItem: React.FC = ({ myTripList }) => {
-
+
{tripName}
-
+
{startDate.replace(/-/g, '.')} -{' '} {endDate.replace(/-/g, '.').split('2024.')} {tripDuration === '0박 1일' ? null : ` (${tripDuration})`}