From 504970ebd112457910f1c083fd480bd59f5351c1 Mon Sep 17 00:00:00 2001 From: Lee jin <83453646+j-nary@users.noreply.github.com> Date: Tue, 22 Oct 2024 00:38:02 +0900 Subject: [PATCH 1/5] =?UTF-8?q?feat:=20=EC=98=A8=EB=B3=B4=EB=94=A9?= =?UTF-8?q?=EC=9D=B4=EB=9E=91=20=EB=8D=B0=EC=9D=B4=ED=84=B0=20=EC=97=B0?= =?UTF-8?q?=EA=B2=B0=20(=EC=98=A8=EB=B3=B4=EB=94=A9=EC=9D=84=20=EA=B1=B0?= =?UTF-8?q?=EC=B9=98=EC=A7=80=20=EC=95=8A=EC=9C=BC=EB=A9=B4=20=EB=A3=A8?= =?UTF-8?q?=ED=8A=B8=20=EA=B2=BD=EB=A1=9C=EB=A1=9C=20=EC=9D=B4=EB=8F=99?= =?UTF-8?q?=ED=95=A9=EB=8B=88=EB=8B=A4)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/seniorProfile/SeniorProfilePage.tsx | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/pages/seniorProfile/SeniorProfilePage.tsx b/src/pages/seniorProfile/SeniorProfilePage.tsx index b385090b..e5fdf1bb 100644 --- a/src/pages/seniorProfile/SeniorProfilePage.tsx +++ b/src/pages/seniorProfile/SeniorProfilePage.tsx @@ -4,7 +4,7 @@ import Complete from '@pages/seniorProfile/components/Complete'; import Init from '@pages/seniorProfile/components/Init'; import PreView from '@pages/seniorProfile/components/preView/index'; import { seniorProfileRegisterType, seniorProfileInitial } from '@pages/seniorProfile/types'; -import { useState } from 'react'; +import { useEffect, useState } from 'react'; import Career from './components/Career'; import Example from './components/Example'; import Sentence from './components/Sentence'; @@ -14,11 +14,20 @@ import { SENIOR_PROFILE_STEPS } from './constants'; import { Header } from '../../components/commons/Header'; import ProgressBar from '../../components/commons/ProgressBar'; import theme from '../../styles/theme'; +import { useLocation, useNavigate } from 'react-router-dom'; const SeniorProfilePage = () => { const [step, setStep] = useState(0); const [profile, setProfile] = useState(seniorProfileInitial); - const userName = step >= 2 && step <= 4 ? '도현' : ''; + const location = useLocation(); + const navigate = useNavigate(); + const { seniorId, nickname } = location.state || {}; + const userName = step >= 2 && step <= 4 ? nickname : ''; + + useEffect(() => { + if (!seniorId || !nickname) navigate('/'); + }, [seniorId, nickname, navigate]); + const getComponent = () => { switch (step) { case 0: @@ -34,7 +43,7 @@ const SeniorProfilePage = () => { case 5: return ; case 6: - return ; + return ; case 7: return ; default: From a91ff0686083b5b643ca1cec9d9ee4742d8ac259 Mon Sep 17 00:00:00 2001 From: Lee jin <83453646+j-nary@users.noreply.github.com> Date: Tue, 22 Oct 2024 00:43:01 +0900 Subject: [PATCH 2/5] =?UTF-8?q?feat:=20=EB=A6=AC=EB=B7=B0=EB=B3=B4?= =?UTF-8?q?=EA=B8=B0=20=EA=B0=80=EC=9A=B4=EB=8D=B0=20=EC=A0=95=EB=A0=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/seniorProfile/components/preView/Review.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pages/seniorProfile/components/preView/Review.tsx b/src/pages/seniorProfile/components/preView/Review.tsx index b4d84c80..204020eb 100644 --- a/src/pages/seniorProfile/components/preView/Review.tsx +++ b/src/pages/seniorProfile/components/preView/Review.tsx @@ -23,6 +23,10 @@ const Meta = styled.p` `; const ReviewBox = styled.p` + display: flex; + align-items: center; + justify-content: center; + width: 100%; padding: 4.4rem 8.7rem 4.3rem 8.6rem; From fc87b1ed455c8aa39fcf28c3264bdf0aa49fc609 Mon Sep 17 00:00:00 2001 From: Lee jin <83453646+j-nary@users.noreply.github.com> Date: Tue, 22 Oct 2024 00:49:37 +0900 Subject: [PATCH 3/5] =?UTF-8?q?feat:=20=EA=B5=AC=EB=B6=84=EC=84=A0=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 --- src/pages/seniorProfile/components/Example.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/pages/seniorProfile/components/Example.tsx b/src/pages/seniorProfile/components/Example.tsx index 5968f1f0..82edd0b4 100644 --- a/src/pages/seniorProfile/components/Example.tsx +++ b/src/pages/seniorProfile/components/Example.tsx @@ -33,6 +33,7 @@ const Example = ({ setStep }: { setStep: React.Dispatch
setSeniorId(0)} /> + ) : ( @@ -81,6 +82,16 @@ const Wrapper = styled.div` background-color: ${({ theme }) => theme.colors.grayScaleLG1}; `; +const Divider = styled.div` + position: fixed; + top: 4.9rem; + + width: 100%; + height: 1.4px; + + background: ${({ theme }) => theme.colors.grayScaleLG2}; +`; + const IconContainer = styled.section` padding-bottom: 2.2rem; `; From 4a3f24fa3e130e78844af8be96d18e95dc719584 Mon Sep 17 00:00:00 2001 From: Lee jin <83453646+j-nary@users.noreply.github.com> Date: Tue, 22 Oct 2024 00:53:44 +0900 Subject: [PATCH 4/5] =?UTF-8?q?feat:=20seniorCard=20=ED=97=A4=EB=8D=94=20?= =?UTF-8?q?=EB=B0=8F=20content=20=EA=B0=84=EA=B2=A9=20=EC=A1=B0=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/commons/seniorCard/SeniorCard.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/commons/seniorCard/SeniorCard.tsx b/src/components/commons/seniorCard/SeniorCard.tsx index 27bbf5fb..3de75f96 100644 --- a/src/components/commons/seniorCard/SeniorCard.tsx +++ b/src/components/commons/seniorCard/SeniorCard.tsx @@ -52,9 +52,11 @@ const SeniorCardWrapper = styled.div<{ $isSmall: boolean }>` display: flex; flex-direction: column; gap: 1rem; + justify-content: center; align-items: center; width: 100%; + padding-top: 3.2rem; border-radius: 8px; background: ${({ theme }) => theme.colors.grayScaleWhite}; @@ -63,7 +65,7 @@ const SeniorCardWrapper = styled.div<{ $isSmall: boolean }>` const SeniorCardLayout = styled.div` display: flex; gap: 1.5rem; - justify-content: center; + justify-content: flex-start; align-items: center; width: 100%; From 6d974c7bb25ceb2d11838e5ed91542722b0c2859 Mon Sep 17 00:00:00 2001 From: Lee jin <83453646+j-nary@users.noreply.github.com> Date: Tue, 29 Oct 2024 18:56:53 +0900 Subject: [PATCH 5/5] =?UTF-8?q?chore:=20=EC=BD=94=EB=93=9C=EB=A6=AC?= =?UTF-8?q?=EB=B7=B0=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/seniorProfile/components/Example.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/seniorProfile/components/Example.tsx b/src/pages/seniorProfile/components/Example.tsx index 82edd0b4..9c185da3 100644 --- a/src/pages/seniorProfile/components/Example.tsx +++ b/src/pages/seniorProfile/components/Example.tsx @@ -87,7 +87,7 @@ const Divider = styled.div` top: 4.9rem; width: 100%; - height: 1.4px; + height: 0.14rem; background: ${({ theme }) => theme.colors.grayScaleLG2}; `;