diff --git a/frontend/src/components/common/TransformBottomSheet/TransformBottomSheet.styled.ts b/frontend/src/components/common/TransformBottomSheet/TransformBottomSheet.styled.ts index f2038181..a954d689 100644 --- a/frontend/src/components/common/TransformBottomSheet/TransformBottomSheet.styled.ts +++ b/frontend/src/components/common/TransformBottomSheet/TransformBottomSheet.styled.ts @@ -1,33 +1,8 @@ -import { css, keyframes } from "@emotion/react"; import styled from "@emotion/styled"; import { PRIMITIVE_COLORS } from "@styles/tokens"; -const slideUp = keyframes` - from { - height: 5rem; - } - to { - height: 12rem; - } -`; - -const slideDown = keyframes` - from { - height: 12rem; - } - to { - height: 5rem; - } -`; - -export const iconButtonStyle = css` - justify-content: center; - - width: 100%; -`; - -export const BottomSheetLayout = styled.div<{ $isOpen: boolean }>` +export const BottomSheetLayout = styled.div` display: flex; flex-direction: column; justify-content: center; @@ -36,20 +11,20 @@ export const BottomSheetLayout = styled.div<{ $isOpen: boolean }>` position: fixed; bottom: 0; z-index: ${({ theme }) => theme.zIndex.bottomSheet}; - gap: 1rem; + gap: ${({ theme }) => theme.spacing.s}; width: 100%; - height: ${({ $isOpen }) => ($isOpen ? "12rem" : "5rem")}; max-width: 48rem; - padding: 1rem; - border-radius: 2rem 2rem 0 0; + padding: ${({ theme }) => theme.spacing.m}; background-color: ${PRIMITIVE_COLORS.white}; - animation: ${({ $isOpen }) => ($isOpen ? slideUp : slideDown)} 0.3s ease-out; box-shadow: 0 -2px 10px rgb(0 0 0 / 10%); `; -export const BottomSheetButtonWrapper = styled.div` +export const BottomSheetButtonContainer = styled.div` + display: flex; + gap: ${({ theme }) => theme.spacing.m}; + width: 100%; `; diff --git a/frontend/src/components/common/TransformBottomSheet/TransformBottomSheet.tsx b/frontend/src/components/common/TransformBottomSheet/TransformBottomSheet.tsx index c2a53a37..991d1b6f 100644 --- a/frontend/src/components/common/TransformBottomSheet/TransformBottomSheet.tsx +++ b/frontend/src/components/common/TransformBottomSheet/TransformBottomSheet.tsx @@ -1,46 +1,30 @@ -import { PropsWithChildren, useState } from "react"; +import { PropsWithChildren } from "react"; + +import { Button, Text } from "@components/common"; -import Button from "../Button/Button"; -import IconButton from "../IconButton/IconButton"; import * as S from "./TransformBottomSheet.styled"; interface TransformBottomSheetProps { buttonLabel: string; + travelPrompt: string; onTransform?: () => void; } const TransformBottomSheet = ({ children, + travelPrompt, buttonLabel, onTransform, }: PropsWithChildren) => { - const [isOpen, setIsOpen] = useState(true); - - const handleToggle = () => { - setIsOpen((prev) => !prev); - }; - return ( - - {isOpen ? ( - <> - - - {children} - - - - - ) : ( - - )} + + {travelPrompt} + + {children} + + ); }; diff --git a/frontend/src/components/pages/travelPlanDetail/TravelPlanDetailPage.styled.ts b/frontend/src/components/pages/travelPlanDetail/TravelPlanDetailPage.styled.ts index 1fcb61a0..f14d05d0 100644 --- a/frontend/src/components/pages/travelPlanDetail/TravelPlanDetailPage.styled.ts +++ b/frontend/src/components/pages/travelPlanDetail/TravelPlanDetailPage.styled.ts @@ -3,6 +3,10 @@ import styled from "@emotion/styled"; import theme from "@styles/theme"; +export const TravelPlanDetailLayout = styled.section` + padding-bottom: 10rem; +`; + export const TitleContainer = styled.div` display: flex; flex-direction: column; diff --git a/frontend/src/components/pages/travelPlanDetail/TravelPlanDetailPage.tsx b/frontend/src/components/pages/travelPlanDetail/TravelPlanDetailPage.tsx index db795e6d..aedfdfb1 100644 --- a/frontend/src/components/pages/travelPlanDetail/TravelPlanDetailPage.tsx +++ b/frontend/src/components/pages/travelPlanDetail/TravelPlanDetailPage.tsx @@ -108,68 +108,71 @@ const TravelPlanDetailPage = () => { return ( <> + + + + {data?.title} + + {!isUUID(id) && ( + + +
+ + {isDropdownOpen && ( + + + 수정 + + + 삭제 + + + )} +
+
+ )} +
+ + + {daysAndNights} 여행 계획 한 눈에 보기 + + {getDateRange({ daysLength: data?.days.length, startDate: data?.startDate })} + + + + `Day ${index + 1}`) ?? []} + tabContent={(selectedIndex) => ( + + )} + /> +
+ + + - - - {data?.title} - - {!isUUID(id) && ( - - -
- - {isDropdownOpen && ( - - - 수정 - - - 삭제 - - - )} -
-
- )} -
- - - {daysAndNights} 여행 계획 한 눈에 보기 - - {getDateRange({ daysLength: data?.days.length, startDate: data?.startDate })} - - - - `Day ${index + 1}`) ?? []} - tabContent={(selectedIndex) => ( - - )} - /> - - - 여행은 즐겁게 다녀오셨나요? - - - theme.spacing.xl}; + + padding-bottom: 10rem; `; export const TravelogueDetailHeader = styled.div` @@ -35,12 +37,11 @@ export const IconButtonContainer = styled.div` position: relative; width: 100%; - padding: 0 1.6rem; `; export const LikesContainer = styled.div` display: flex; - gap: 0.8rem; + flex-direction: column; align-items: center; `; @@ -69,7 +70,3 @@ export const authorDateStyle = css` export const cursorPointerStyle = css` cursor: pointer; `; - -export const transformBottomSheetTextStyle = css` - ${theme.typography.mobile.detailBold} -`; diff --git a/frontend/src/components/pages/travelogueDetail/TravelogueDetailPage.tsx b/frontend/src/components/pages/travelogueDetail/TravelogueDetailPage.tsx index 89d67194..0f57eb03 100644 --- a/frontend/src/components/pages/travelogueDetail/TravelogueDetailPage.tsx +++ b/frontend/src/components/pages/travelogueDetail/TravelogueDetailPage.tsx @@ -106,6 +106,12 @@ const TravelogueDetailPage = () => { const { mutate: handleActiveHeart, isPaused: isPostingHeartPaused } = usePostUpdateHeart(); const { mutate: handleInactiveHeart, isPaused: isDeletingHeartPaused } = useDeleteUpdateHeart(); + const handleHeartClick = () => { + if (data?.isLiked) return handleInactiveHeart(id); + + return handleActiveHeart(id); + }; + if ( isGettingTraveloguePaused || isDeletingTraveloguePaused || @@ -133,62 +139,45 @@ const TravelogueDetailPage = () => { {data?.title} - - - {data?.authorNickname} - - - {data?.createdAt} - - - - - - {data?.isLiked ? ( - handleInactiveHeart(id)} - iconType="heart" - color={SEMANTIC_COLORS.heart} - size="24" - /> - ) : ( - handleActiveHeart(id)} - iconType="empty-heart" - size="24" - /> + + + + {data?.authorNickname} + + + {data?.createdAt} + + + {isAuthor && ( +
+ + {isDropdownOpen && ( + + + 수정 + + + 삭제 + + + )} +
)} - {data?.likeCount} -
- {isAuthor && ( -
- - {isDropdownOpen && ( - - - 수정 - - - 삭제 - - - )} -
- )} -
+ + @@ -205,13 +194,22 @@ const TravelogueDetailPage = () => { )} /> - {!isAuthor && ( - - - 이 여행기를 따라가고 싶으신가요? - - - )} + + + + + {data?.likeCount} + + { > 여행 장소 살펴보기 -
+
{places.map((place, index) => (