From dfe6b5412437cfbb11cdfc915261f516fad84ba2 Mon Sep 17 00:00:00 2001 From: chysis Date: Sun, 29 Dec 2024 22:09:56 +0900 Subject: [PATCH 1/7] =?UTF-8?q?chore:=20=EC=83=81=EB=8B=A8=20=EC=9D=B4?= =?UTF-8?q?=EB=8F=99=20=EB=B2=84=ED=8A=BC=EC=9D=B4=20=EC=A4=91=EB=B3=B5?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EB=93=A4=EC=96=B4=EA=B0=84=20=EB=AC=B8?= =?UTF-8?q?=EC=A0=9C=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/pages/ReviewCollectionPage/index.tsx | 3 +-- frontend/src/pages/ReviewListPage/index.tsx | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/frontend/src/pages/ReviewCollectionPage/index.tsx b/frontend/src/pages/ReviewCollectionPage/index.tsx index c582d30e6..90a25c32e 100644 --- a/frontend/src/pages/ReviewCollectionPage/index.tsx +++ b/frontend/src/pages/ReviewCollectionPage/index.tsx @@ -1,4 +1,4 @@ -import { AuthAndServerErrorFallback, ErrorSuspenseContainer, TopButton } from '@/components'; +import { AuthAndServerErrorFallback, ErrorSuspenseContainer } from '@/components'; import ReviewDisplayLayout from '@/components/layouts/ReviewDisplayLayout'; import ReviewCollectionPageContents from './components/ReviewCollectionPageContents'; @@ -8,7 +8,6 @@ const ReviewCollectionPage = () => { - ); diff --git a/frontend/src/pages/ReviewListPage/index.tsx b/frontend/src/pages/ReviewListPage/index.tsx index a2aec6cdf..ada1bc7d4 100644 --- a/frontend/src/pages/ReviewListPage/index.tsx +++ b/frontend/src/pages/ReviewListPage/index.tsx @@ -1,4 +1,4 @@ -import { ErrorSuspenseContainer, AuthAndServerErrorFallback, TopButton } from '@/components'; +import { ErrorSuspenseContainer, AuthAndServerErrorFallback } from '@/components'; import ReviewDisplayLayout from '@/components/layouts/ReviewDisplayLayout'; import ReviewListPageContents from './components/ReviewListPageContents'; @@ -8,7 +8,6 @@ const ReviewListPage = () => { - ); From 21edb0827de6125f4a8e33f59201c89f346f52ad Mon Sep 17 00:00:00 2001 From: chysis Date: Sat, 4 Jan 2025 03:24:49 +0900 Subject: [PATCH 2/7] =?UTF-8?q?feat:=20=EB=92=A4=EB=A1=9C=20=EA=B0=80?= =?UTF-8?q?=EA=B8=B0=20=EB=B2=84=ED=8A=BC=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/assets/backButton.svg | 3 ++ .../components/common/BackButton/index.tsx | 28 +++++++++++++++++++ .../components/common/BackButton/styles.ts | 14 ++++++++++ 3 files changed, 45 insertions(+) create mode 100644 frontend/src/assets/backButton.svg create mode 100644 frontend/src/components/common/BackButton/index.tsx create mode 100644 frontend/src/components/common/BackButton/styles.ts diff --git a/frontend/src/assets/backButton.svg b/frontend/src/assets/backButton.svg new file mode 100644 index 000000000..3693f7b99 --- /dev/null +++ b/frontend/src/assets/backButton.svg @@ -0,0 +1,3 @@ + + + diff --git a/frontend/src/components/common/BackButton/index.tsx b/frontend/src/components/common/BackButton/index.tsx new file mode 100644 index 000000000..5eebcb4d0 --- /dev/null +++ b/frontend/src/components/common/BackButton/index.tsx @@ -0,0 +1,28 @@ +import React from 'react'; +import { NavigateOptions, useNavigate } from 'react-router'; + +import BackButtonIcon from '@/assets/backButton.svg'; + +import * as S from './styles'; + +interface BackButtonProps { + prevPath: string; + options?: NavigateOptions; + style?: React.CSSProperties; +} + +const BackButton = ({ prevPath, options, style }: BackButtonProps) => { + const navigate = useNavigate(); + + const handleBackButtonClick = () => { + navigate(prevPath, options); + }; + + return ( + + + + ); +}; + +export default BackButton; diff --git a/frontend/src/components/common/BackButton/styles.ts b/frontend/src/components/common/BackButton/styles.ts new file mode 100644 index 000000000..aed0b63f1 --- /dev/null +++ b/frontend/src/components/common/BackButton/styles.ts @@ -0,0 +1,14 @@ +import styled from '@emotion/styled'; + +interface BackButtonStyleProps { + $style?: React.CSSProperties; +} + +export const BackButton = styled.button` + width: 3.5rem; + height: 3.5rem; + + ${({ $style }) => $style && { ...$style }} +`; + +export const BackButtonImage = styled.img``; From 940069f4f8ed49e638406cba8ce88868357fd600 Mon Sep 17 00:00:00 2001 From: chysis Date: Sat, 4 Jan 2025 16:24:48 +0900 Subject: [PATCH 3/7] =?UTF-8?q?chore:=20=EB=B6=88=ED=95=84=EC=9A=94?= =?UTF-8?q?=ED=95=9C=20=EC=A3=BC=EC=84=9D=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/DetailedReviewPageContents/index.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/frontend/src/pages/DetailedReviewPage/components/DetailedReviewPageContents/index.tsx b/frontend/src/pages/DetailedReviewPage/components/DetailedReviewPageContents/index.tsx index cef4b9e72..28a8e9e4b 100644 --- a/frontend/src/pages/DetailedReviewPage/components/DetailedReviewPageContents/index.tsx +++ b/frontend/src/pages/DetailedReviewPage/components/DetailedReviewPageContents/index.tsx @@ -46,7 +46,6 @@ const DetailedReviewPageContents = () => { }; }, [detailedReview]); - // TODO: 리뷰 공개/비공개 토글 버튼 기능 return ( Date: Sun, 5 Jan 2025 02:46:53 +0900 Subject: [PATCH 4/7] =?UTF-8?q?refactor:=20=EB=92=A4=EB=A1=9C=20=EA=B0=80?= =?UTF-8?q?=EA=B8=B0=20=EB=B2=84=ED=8A=BC=EC=9D=84=20=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=EC=97=90=20=EB=B0=B0=EC=B9=98=ED=95=A0=20=EB=95=8C=20?= =?UTF-8?q?=ED=95=84=EC=9A=94=ED=95=9C=20=EA=B3=B5=ED=86=B5=20=EC=8A=A4?= =?UTF-8?q?=ED=83=80=EC=9D=BC=EB=A7=81=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/common/BackButton/index.tsx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/common/BackButton/index.tsx b/frontend/src/components/common/BackButton/index.tsx index 5eebcb4d0..13acecf2c 100644 --- a/frontend/src/components/common/BackButton/index.tsx +++ b/frontend/src/components/common/BackButton/index.tsx @@ -8,10 +8,11 @@ import * as S from './styles'; interface BackButtonProps { prevPath: string; options?: NavigateOptions; - style?: React.CSSProperties; + buttonStyle?: React.CSSProperties; + wrapperStyle?: React.CSSProperties; } -const BackButton = ({ prevPath, options, style }: BackButtonProps) => { +const BackButton = ({ prevPath, options, buttonStyle, wrapperStyle }: BackButtonProps) => { const navigate = useNavigate(); const handleBackButtonClick = () => { @@ -19,9 +20,11 @@ const BackButton = ({ prevPath, options, style }: BackButtonProps) => { }; return ( - - - + + + 뒤로가기 버튼 + + ); }; From 3f26cdb7df8caa3b94c13ef7aa139c6dd43040f5 Mon Sep 17 00:00:00 2001 From: chysis Date: Sun, 5 Jan 2025 12:50:31 +0900 Subject: [PATCH 5/7] =?UTF-8?q?chore:=20=EB=88=84=EB=9D=BD=EB=90=9C=20?= =?UTF-8?q?=EC=8A=A4=ED=83=80=EC=9D=BC=20=EC=BD=94=EB=93=9C=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/common/BackButton/styles.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/common/BackButton/styles.ts b/frontend/src/components/common/BackButton/styles.ts index aed0b63f1..46a909b04 100644 --- a/frontend/src/components/common/BackButton/styles.ts +++ b/frontend/src/components/common/BackButton/styles.ts @@ -4,11 +4,17 @@ interface BackButtonStyleProps { $style?: React.CSSProperties; } +export const BackButtonWrapper = styled.div` + display: flex; + justify-content: flex-start; + width: 100%; + + ${({ $style }) => $style && { ...$style }} +`; + export const BackButton = styled.button` width: 3.5rem; height: 3.5rem; ${({ $style }) => $style && { ...$style }} `; - -export const BackButtonImage = styled.img``; From bb4ae5a2a63bb3bf2f98552be8d1f0175f246d60 Mon Sep 17 00:00:00 2001 From: chysis Date: Sun, 5 Jan 2025 14:33:01 +0900 Subject: [PATCH 6/7] =?UTF-8?q?refactor:=20props=20=EB=84=A4=EC=9D=B4?= =?UTF-8?q?=EB=B0=8D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/common/BackButton/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/common/BackButton/index.tsx b/frontend/src/components/common/BackButton/index.tsx index 13acecf2c..43fb3de47 100644 --- a/frontend/src/components/common/BackButton/index.tsx +++ b/frontend/src/components/common/BackButton/index.tsx @@ -7,16 +7,16 @@ import * as S from './styles'; interface BackButtonProps { prevPath: string; - options?: NavigateOptions; + navigateOptions?: NavigateOptions; buttonStyle?: React.CSSProperties; wrapperStyle?: React.CSSProperties; } -const BackButton = ({ prevPath, options, buttonStyle, wrapperStyle }: BackButtonProps) => { +const BackButton = ({ prevPath, navigateOptions, buttonStyle, wrapperStyle }: BackButtonProps) => { const navigate = useNavigate(); const handleBackButtonClick = () => { - navigate(prevPath, options); + navigate(prevPath, navigateOptions); }; return ( From 43788d958dd41dc150aae65bfa7d7f375c3bcb8d Mon Sep 17 00:00:00 2001 From: chysis Date: Sun, 5 Jan 2025 14:52:48 +0900 Subject: [PATCH 7/7] =?UTF-8?q?chore:=20BackButton=EC=9D=98=20type=20?= =?UTF-8?q?=EC=86=8D=EC=84=B1=20=EC=A7=80=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/common/BackButton/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/common/BackButton/index.tsx b/frontend/src/components/common/BackButton/index.tsx index 43fb3de47..c2e295c27 100644 --- a/frontend/src/components/common/BackButton/index.tsx +++ b/frontend/src/components/common/BackButton/index.tsx @@ -21,7 +21,7 @@ const BackButton = ({ prevPath, navigateOptions, buttonStyle, wrapperStyle }: Ba return ( - + 뒤로가기 버튼