From 5e7845ba986e0ed5a0b1ddaa761e372ba07ead43 Mon Sep 17 00:00:00 2001 From: Eunseo Sim <55528304+simeunseo@users.noreply.github.com> Date: Mon, 7 Aug 2023 15:57:05 +0900 Subject: [PATCH 01/10] Create refactor-request.md --- .github/ISSUE_TEMPLATE/refactor-request.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/refactor-request.md diff --git a/.github/ISSUE_TEMPLATE/refactor-request.md b/.github/ISSUE_TEMPLATE/refactor-request.md new file mode 100644 index 00000000..8a9d3baf --- /dev/null +++ b/.github/ISSUE_TEMPLATE/refactor-request.md @@ -0,0 +1,15 @@ +--- +name: Refactor request +about: 기능 리팩토링 템플릿 +title: "[Refactor] 제목" +labels: '' +assignees: '' + +--- + +## 🛠 Issue + +- +## 📝 To-do + +- [ ] todo! From 1a6f0ce6ceda7873785c06e50d4fe2ec51ebe546 Mon Sep 17 00:00:00 2001 From: ljh0608 Date: Mon, 11 Sep 2023 16:05:08 +0900 Subject: [PATCH 02/10] fix: incorrect login error modal --- .../components/HostComponent.tsx | 26 +++-- .../components/IncorrectLoginModal.tsx | 0 .../{ReturnModal.tsx => ReturnModal1.tsx} | 4 +- .../LoginEntrance/components/ReturnModal2.tsx | 95 +++++++++++++++++++ 4 files changed, 113 insertions(+), 12 deletions(-) create mode 100644 src/pages/LoginEntrance/components/IncorrectLoginModal.tsx rename src/pages/LoginEntrance/components/{ReturnModal.tsx => ReturnModal1.tsx} (100%) create mode 100644 src/pages/LoginEntrance/components/ReturnModal2.tsx diff --git a/src/pages/LoginEntrance/components/HostComponent.tsx b/src/pages/LoginEntrance/components/HostComponent.tsx index 3bd4c3de..06599747 100644 --- a/src/pages/LoginEntrance/components/HostComponent.tsx +++ b/src/pages/LoginEntrance/components/HostComponent.tsx @@ -1,18 +1,18 @@ import React, { Dispatch, SetStateAction, useState } from 'react'; +import { useNavigate, useParams } from 'react-router-dom'; import { AxiosError } from 'axios'; import Button from 'components/atomComponents/Button'; +import Header from 'components/moleculesComponents/Header'; import PasswordInput from 'components/atomComponents/PasswordInput'; +import ReturnModal1 from './ReturnModal1'; +import ReturnModal2 from './ReturnModal2'; import Text from 'components/atomComponents/Text'; import TextInput from 'components/atomComponents/TextInput'; -import Header from 'components/moleculesComponents/Header'; import TitleComponent from 'components/moleculesComponents/TitleComponents'; -import { useNavigate, useParams } from 'react-router-dom'; +import { client } from 'utils/apis/axios'; import styled from 'styled-components/macro'; import { theme } from 'styles/theme'; -import { client } from 'utils/apis/axios'; - -import ReturnModal from './ReturnModal'; interface HostInfoProps { name: string; @@ -44,24 +44,29 @@ function HostComponent({ hostInfo, setHostInfo }: HostProps) { }; const [ismodalOpen, setIsModalOpen] = useState(false); - + const [isLoginModalOpen, setIsLoginModalOpen]= useState(false); + // const incorrect_login_info=()=>{ + + // } const loginHost = async () => { try { const result = await client.post(`/user/${meetingId}/host`, hostInfo); const { data: { code, data, message }, } = result; + + console.log(code); if (code === 200) { localStorage.setItem('hostToken', data.accessToken); navigate(`/host/${meetingId}`); } else if (code === 403) { setIsModalOpen(true); - } else { - console.log(message); + } else if(code===401){ + setIsLoginModalOpen(true); } } catch { (error: AxiosError) => { - console.log(error); + console.log("login_error: "+error); }; } }; @@ -104,7 +109,8 @@ function HostComponent({ hostInfo, setHostInfo }: HostProps) { 방장 페이지 접속하기 - {ismodalOpen ? : undefined} + {ismodalOpen ? : undefined} + {isLoginModalOpen? : undefined} ); } diff --git a/src/pages/LoginEntrance/components/IncorrectLoginModal.tsx b/src/pages/LoginEntrance/components/IncorrectLoginModal.tsx new file mode 100644 index 00000000..e69de29b diff --git a/src/pages/LoginEntrance/components/ReturnModal.tsx b/src/pages/LoginEntrance/components/ReturnModal1.tsx similarity index 100% rename from src/pages/LoginEntrance/components/ReturnModal.tsx rename to src/pages/LoginEntrance/components/ReturnModal1.tsx index 420a9557..e8458d17 100644 --- a/src/pages/LoginEntrance/components/ReturnModal.tsx +++ b/src/pages/LoginEntrance/components/ReturnModal1.tsx @@ -1,8 +1,8 @@ +import { Link, useParams } from 'react-router-dom'; import React, { Dispatch, SetStateAction, useState } from 'react'; -import Text from 'components/atomComponents/Text'; import { ExitIc } from 'components/Icon/icon'; -import { Link, useParams } from 'react-router-dom'; +import Text from 'components/atomComponents/Text'; import styled from 'styled-components/macro'; import { theme } from 'styles/theme'; diff --git a/src/pages/LoginEntrance/components/ReturnModal2.tsx b/src/pages/LoginEntrance/components/ReturnModal2.tsx new file mode 100644 index 00000000..d9b62e06 --- /dev/null +++ b/src/pages/LoginEntrance/components/ReturnModal2.tsx @@ -0,0 +1,95 @@ +import { Link, useParams } from 'react-router-dom'; +import React, { Dispatch, SetStateAction, useState } from 'react'; + +import { ExitIc } from 'components/Icon/icon'; +import Text from 'components/atomComponents/Text'; +import styled from 'styled-components/macro'; +import { theme } from 'styles/theme'; + +interface ModalProps { + setIsLoginModalOpen: Dispatch>; +} + +function ReturnModal2({ setIsLoginModalOpen }: ModalProps) { +// const { meetingId } = useParams(); + return ( + + + setIsLoginModalOpen(false)}> + + + {/* + 잠깐! + */} + + + 유효하지 않은 사용자 이름 + + + 또는 비밀번호 입니다. + + + setIsLoginModalOpen(false)}> + + 다시 입력하기 + + + + + ); +} + +export default ReturnModal2; + +const ReturnModalWrpper = styled.div` + display: flex; + position: absolute; + left: 0; + flex-direction: column; + align-items: center; + justify-content: center; + background-color: rgba(0, 0, 0, 0.6); + width: 100%; + height: 100vh; +`; + +const ModalSection = styled.article` + display: flex; + position: relative; + flex-direction: column; + align-items: center; + justify-content: center; + border-radius: 0.8rem; + background-color: ${({ theme }) => theme.colors.grey8}; + width: 28.8rem; + height: 21.2rem; +`; + +const IconCatainer = styled.div` + display: flex; + position: absolute; + top: 0.8rem; + right: 0.8rem; + align-items: center; + justify-content: center; + cursor: pointer; + width: 3.2rem; + height: 3.2rem; +`; + +const MentContainer = styled.div` + display: flex; + flex-direction: column; + align-items: center; + margin-top: 1.2rem; +`; +const ModalBtn = styled.button` + display: flex; + align-items: center; + justify-content: center; + margin-top: 2.4rem; + border-radius: 0.6rem; + background-color: ${({ theme }) => theme.colors.main1}; + width: 17.6rem; + height: 4.2rem; +`; From 2442e3834510b13bbab26b8d3e7c0c051cb257e6 Mon Sep 17 00:00:00 2001 From: simeunseo Date: Mon, 11 Sep 2023 16:08:18 +0900 Subject: [PATCH 03/10] =?UTF-8?q?style:=20toast=20height=20=EC=A1=B0?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/SteppingStone/components/SteppingBody.tsx | 2 +- src/utils/toast/ToastContainer.tsx | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/pages/SteppingStone/components/SteppingBody.tsx b/src/pages/SteppingStone/components/SteppingBody.tsx index 1d2f0cb0..a2fcaeb0 100644 --- a/src/pages/SteppingStone/components/SteppingBody.tsx +++ b/src/pages/SteppingStone/components/SteppingBody.tsx @@ -37,7 +37,7 @@ const bodyType: BodyType = { }, meetEntrance: { img: png, - main: '에이셉 전체회의', + main: '에이셉 전체회의', // 찬우오빠.. 내가 범인 찾았어 - 2023.09.11 은서가 sub: ( <> diff --git a/src/utils/toast/ToastContainer.tsx b/src/utils/toast/ToastContainer.tsx index 6325e202..8b3b0178 100644 --- a/src/utils/toast/ToastContainer.tsx +++ b/src/utils/toast/ToastContainer.tsx @@ -24,15 +24,16 @@ const StyledToastContainer = styled(ToastContainer)` display: flex; position: absolute; bottom: 6rem; - /* left:-2rem; */ align-items: center; justify-content: center; .Toastify__toast { - border-radius: 5rem; - background-color: #2e2e2e !important; width: 19rem; height: 4rem !important; + min-height: 0; + margin-bottom: 2.4rem; + background-color: #2e2e2e !important; + border-radius: 5rem; } .Toastify__toast-body div { From 1a3eab4fad7e4bdee2cabd712c2c9dfd2a5190b4 Mon Sep 17 00:00:00 2001 From: ljh0608 Date: Mon, 11 Sep 2023 16:24:05 +0900 Subject: [PATCH 04/10] =?UTF-8?q?chore:=20=EC=A3=BC=EC=84=9D=20=EB=B0=8F?= =?UTF-8?q?=20=EC=BD=98=EC=86=94=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/LoginEntrance/components/HostComponent.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/pages/LoginEntrance/components/HostComponent.tsx b/src/pages/LoginEntrance/components/HostComponent.tsx index 06599747..b791bb44 100644 --- a/src/pages/LoginEntrance/components/HostComponent.tsx +++ b/src/pages/LoginEntrance/components/HostComponent.tsx @@ -45,9 +45,7 @@ function HostComponent({ hostInfo, setHostInfo }: HostProps) { const [ismodalOpen, setIsModalOpen] = useState(false); const [isLoginModalOpen, setIsLoginModalOpen]= useState(false); - // const incorrect_login_info=()=>{ - - // } + const loginHost = async () => { try { const result = await client.post(`/user/${meetingId}/host`, hostInfo); @@ -55,7 +53,7 @@ function HostComponent({ hostInfo, setHostInfo }: HostProps) { data: { code, data, message }, } = result; - console.log(code); + if (code === 200) { localStorage.setItem('hostToken', data.accessToken); navigate(`/host/${meetingId}`); @@ -64,6 +62,9 @@ function HostComponent({ hostInfo, setHostInfo }: HostProps) { } else if(code===401){ setIsLoginModalOpen(true); } + else{ + console.log(message); + } } catch { (error: AxiosError) => { console.log("login_error: "+error); From 31a7df498968266a04bb90526a73e786d7fbb084 Mon Sep 17 00:00:00 2001 From: simeunseo Date: Mon, 11 Sep 2023 16:42:44 +0900 Subject: [PATCH 05/10] =?UTF-8?q?style:=20head2=20weight=EB=A5=BC=20700?= =?UTF-8?q?=EC=97=90=EC=84=9C=20600=EC=9C=BC=EB=A1=9C=20=EC=A1=B0=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/styles/theme.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/styles/theme.ts b/src/styles/theme.ts index a942ddc5..7da38ded 100644 --- a/src/styles/theme.ts +++ b/src/styles/theme.ts @@ -54,7 +54,7 @@ const FONT = ({ family, weight, size, lineHeight }: Font): string => { const fonts = { head1: FONT({ family: 'Pretendard Variable', weight: 600, size: 2.8, lineHeight: 3.4 }), - head2: FONT({ family: 'Pretendard Variable', weight: 700, size: 2.2, lineHeight: 3 }), + head2: FONT({ family: 'Pretendard Variable', weight: 600, size: 2.2, lineHeight: 3 }), title1: FONT({ family: 'Pretendard Variable', weight: 600, size: 1.8, lineHeight: 2.4 }), title2: FONT({ family: 'Pretendard Variable', weight: 400, size: 1.6, lineHeight: 2 }), From 7e4ac1f38c79499c3473df603a983c369458a037 Mon Sep 17 00:00:00 2001 From: simeunseo Date: Mon, 11 Sep 2023 16:47:32 +0900 Subject: [PATCH 06/10] =?UTF-8?q?style:=20title2=20weight=EB=A5=BC=20400?= =?UTF-8?q?=EC=97=90=EC=84=9C=20500=EC=9C=BC=EB=A1=9C=20=EC=A1=B0=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/styles/theme.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/styles/theme.ts b/src/styles/theme.ts index 7da38ded..ec9876a0 100644 --- a/src/styles/theme.ts +++ b/src/styles/theme.ts @@ -57,7 +57,7 @@ const fonts = { head2: FONT({ family: 'Pretendard Variable', weight: 600, size: 2.2, lineHeight: 3 }), title1: FONT({ family: 'Pretendard Variable', weight: 600, size: 1.8, lineHeight: 2.4 }), - title2: FONT({ family: 'Pretendard Variable', weight: 400, size: 1.6, lineHeight: 2 }), + title2: FONT({ family: 'Pretendard Variable', weight: 500, size: 1.6, lineHeight: 2 }), body1: FONT({ family: 'Pretendard Variable', weight: 500, size: 1.6, lineHeight: 2.4 }), body2: FONT({ family: 'Pretendard Variable', weight: 500, size: 1.4, lineHeight: 2 }), From 30738bd073b0158011cb3dc8ce5aa68c61b353fd Mon Sep 17 00:00:00 2001 From: ljh0608 Date: Mon, 11 Sep 2023 17:38:26 +0900 Subject: [PATCH 07/10] =?UTF-8?q?chore:=20modal=20component=20=EC=9D=B4?= =?UTF-8?q?=EB=A6=84=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/moleculesComponents/Header.tsx | 30 +++++++++---------- .../components/HostComponent.tsx | 8 ++--- ...eturnModal2.tsx => IncorrectInfoModal.tsx} | 4 +-- .../components/IncorrectLoginModal.tsx | 0 ...urnModal1.tsx => NoAvailableTimeModal.tsx} | 4 +-- 5 files changed, 22 insertions(+), 24 deletions(-) rename src/pages/LoginEntrance/components/{ReturnModal2.tsx => IncorrectInfoModal.tsx} (95%) delete mode 100644 src/pages/LoginEntrance/components/IncorrectLoginModal.tsx rename src/pages/LoginEntrance/components/{ReturnModal1.tsx => NoAvailableTimeModal.tsx} (95%) diff --git a/src/components/moleculesComponents/Header.tsx b/src/components/moleculesComponents/Header.tsx index 0e58fa5e..10528811 100644 --- a/src/components/moleculesComponents/Header.tsx +++ b/src/components/moleculesComponents/Header.tsx @@ -1,16 +1,14 @@ +import { BackIc, ExitIc, HambergerIc, LinkIc, MainLogoIc } from 'components/Icon/icon'; import { Dispatch, SetStateAction, useState } from 'react'; -import Text from 'components/atomComponents/Text'; -import { BackIc, ExitIc, HambergerIc, LinkIc, MainLogoIc } from 'components/Icon/icon'; import CopyToClipboard from 'react-copy-to-clipboard'; -import { useParams } from 'react-router'; -import { useNavigate } from 'react-router-dom'; +import Navigation from './Navigation'; +import Text from 'components/atomComponents/Text'; +import { notify } from 'utils/toast/copyLink'; import styled from 'styled-components/macro'; import { theme } from 'styles/theme'; -import { notify } from 'utils/toast/copyLink'; - -import Navigation from './Navigation'; - +import { useNavigate } from 'react-router-dom'; +import { useParams } from 'react-router'; interface HeaderProps { position: string; @@ -19,14 +17,14 @@ interface HeaderProps { function Header({ position, setStep }: HeaderProps) { const navigationOptions = [ - { - title: '공지사항', - url: '', - }, - { - title: 'ASAP family', - url: '', - }, + // { + // title: '공지사항', + // url: '', + // }, + // { + // title: 'ASAP family', + // url: '', + // }, { title: '약속 생성하기', url: '/meet/create', diff --git a/src/pages/LoginEntrance/components/HostComponent.tsx b/src/pages/LoginEntrance/components/HostComponent.tsx index b791bb44..9230534a 100644 --- a/src/pages/LoginEntrance/components/HostComponent.tsx +++ b/src/pages/LoginEntrance/components/HostComponent.tsx @@ -4,9 +4,9 @@ import { useNavigate, useParams } from 'react-router-dom'; import { AxiosError } from 'axios'; import Button from 'components/atomComponents/Button'; import Header from 'components/moleculesComponents/Header'; +import IncorrectInfoModal from './IncorrectInfoModal'; +import NoAvailableTimeModal from './NoAvailableTimeModal'; import PasswordInput from 'components/atomComponents/PasswordInput'; -import ReturnModal1 from './ReturnModal1'; -import ReturnModal2 from './ReturnModal2'; import Text from 'components/atomComponents/Text'; import TextInput from 'components/atomComponents/TextInput'; import TitleComponent from 'components/moleculesComponents/TitleComponents'; @@ -110,8 +110,8 @@ function HostComponent({ hostInfo, setHostInfo }: HostProps) { 방장 페이지 접속하기 - {ismodalOpen ? : undefined} - {isLoginModalOpen? : undefined} + {ismodalOpen ? : undefined} + {isLoginModalOpen? : undefined} ); } diff --git a/src/pages/LoginEntrance/components/ReturnModal2.tsx b/src/pages/LoginEntrance/components/IncorrectInfoModal.tsx similarity index 95% rename from src/pages/LoginEntrance/components/ReturnModal2.tsx rename to src/pages/LoginEntrance/components/IncorrectInfoModal.tsx index d9b62e06..50e8db62 100644 --- a/src/pages/LoginEntrance/components/ReturnModal2.tsx +++ b/src/pages/LoginEntrance/components/IncorrectInfoModal.tsx @@ -10,7 +10,7 @@ interface ModalProps { setIsLoginModalOpen: Dispatch>; } -function ReturnModal2({ setIsLoginModalOpen }: ModalProps) { +function IncorrectInfoModal({ setIsLoginModalOpen }: ModalProps) { // const { meetingId } = useParams(); return ( @@ -39,7 +39,7 @@ function ReturnModal2({ setIsLoginModalOpen }: ModalProps) { ); } -export default ReturnModal2; +export default IncorrectInfoModal; const ReturnModalWrpper = styled.div` display: flex; diff --git a/src/pages/LoginEntrance/components/IncorrectLoginModal.tsx b/src/pages/LoginEntrance/components/IncorrectLoginModal.tsx deleted file mode 100644 index e69de29b..00000000 diff --git a/src/pages/LoginEntrance/components/ReturnModal1.tsx b/src/pages/LoginEntrance/components/NoAvailableTimeModal.tsx similarity index 95% rename from src/pages/LoginEntrance/components/ReturnModal1.tsx rename to src/pages/LoginEntrance/components/NoAvailableTimeModal.tsx index e8458d17..3b56bf2d 100644 --- a/src/pages/LoginEntrance/components/ReturnModal1.tsx +++ b/src/pages/LoginEntrance/components/NoAvailableTimeModal.tsx @@ -10,7 +10,7 @@ interface ModalProps { setIsModalOpen: Dispatch>; } -function ReturnModal({ setIsModalOpen }: ModalProps) { +function NoAvailableTimeModal ({ setIsModalOpen }: ModalProps) { const { meetingId } = useParams(); return ( @@ -41,7 +41,7 @@ function ReturnModal({ setIsModalOpen }: ModalProps) { ); } -export default ReturnModal; +export default NoAvailableTimeModal; const ReturnModalWrpper = styled.div` display: flex; From 3ccd0917f05f42888115ca7191c0ee312918e2e2 Mon Sep 17 00:00:00 2001 From: ljh0608 Date: Mon, 11 Sep 2023 17:39:14 +0900 Subject: [PATCH 08/10] =?UTF-8?q?chore:=20=EC=A3=BC=EC=84=9D=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/LoginEntrance/components/IncorrectInfoModal.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/pages/LoginEntrance/components/IncorrectInfoModal.tsx b/src/pages/LoginEntrance/components/IncorrectInfoModal.tsx index 50e8db62..232ce6b2 100644 --- a/src/pages/LoginEntrance/components/IncorrectInfoModal.tsx +++ b/src/pages/LoginEntrance/components/IncorrectInfoModal.tsx @@ -11,16 +11,13 @@ interface ModalProps { } function IncorrectInfoModal({ setIsLoginModalOpen }: ModalProps) { -// const { meetingId } = useParams(); return ( setIsLoginModalOpen(false)}> - {/* - 잠깐! - */} + 유효하지 않은 사용자 이름 From dc26a41e45ac2154e263795bfae5210befeaa27d Mon Sep 17 00:00:00 2001 From: simeunseo Date: Mon, 11 Sep 2023 17:43:26 +0900 Subject: [PATCH 09/10] =?UTF-8?q?refactor:=20important=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/toast/ToastContainer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/toast/ToastContainer.tsx b/src/utils/toast/ToastContainer.tsx index 8b3b0178..976d080d 100644 --- a/src/utils/toast/ToastContainer.tsx +++ b/src/utils/toast/ToastContainer.tsx @@ -32,7 +32,7 @@ const StyledToastContainer = styled(ToastContainer)` height: 4rem !important; min-height: 0; margin-bottom: 2.4rem; - background-color: #2e2e2e !important; + background-color: #2e2e2e; border-radius: 5rem; } From 4281239adbea5a106255c03182f1ec4efdbae427 Mon Sep 17 00:00:00 2001 From: simeunseo Date: Wed, 13 Sep 2023 17:32:56 +0900 Subject: [PATCH 10/10] =?UTF-8?q?fix:=20=ED=9A=8C=EC=9D=98=20=EC=9E=85?= =?UTF-8?q?=EC=9E=A5=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=ED=83=80=EC=9D=B4?= =?UTF-8?q?=ED=8B=80=EC=9D=84=20api=20=EC=9D=91=EB=8B=B5=EC=9C=BC=EB=A1=9C?= =?UTF-8?q?=20=EB=B0=9B=EC=9D=80=20=ED=9A=8C=EC=9D=98=EB=AA=85=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/SteppingStone/SteppingLayout.tsx | 8 ++++++-- src/pages/SteppingStone/components/SteppingBody.tsx | 7 ++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/pages/SteppingStone/SteppingLayout.tsx b/src/pages/SteppingStone/SteppingLayout.tsx index 35f8d9fd..d67e0723 100644 --- a/src/pages/SteppingStone/SteppingLayout.tsx +++ b/src/pages/SteppingStone/SteppingLayout.tsx @@ -16,9 +16,13 @@ function SteppingLayout({ steppingType }: SteppingProps) { const navigate = useNavigate(); const { meetingId } = useParams(); + const [meetingTitle, setMeetingTitle] = useState(''); + const isConfirmedMeet = async () => { + // 회의명 붙이기 const result = await client.get(`/meeting/${meetingId}`); - console.log(result); + + setMeetingTitle(result.data.data.title); if (result.data.code === 409) { navigate(`/q-card/${meetingId}`); } @@ -37,7 +41,7 @@ function SteppingLayout({ steppingType }: SteppingProps) { <>
- + diff --git a/src/pages/SteppingStone/components/SteppingBody.tsx b/src/pages/SteppingStone/components/SteppingBody.tsx index a2fcaeb0..618eaf2b 100644 --- a/src/pages/SteppingStone/components/SteppingBody.tsx +++ b/src/pages/SteppingStone/components/SteppingBody.tsx @@ -37,7 +37,7 @@ const bodyType: BodyType = { }, meetEntrance: { img: png, - main: '에이셉 전체회의', // 찬우오빠.. 내가 범인 찾았어 - 2023.09.11 은서가 + main: '', sub: ( <> @@ -67,16 +67,17 @@ const bodyType: BodyType = { interface SteppingProps { steppingType: string; + meetingTitle?: string; } -function SteppingBody({ steppingType }: SteppingProps) { +function SteppingBody({ steppingType, meetingTitle }: SteppingProps) { const stepInfo = bodyType[steppingType]; return ( {stepInfo.img} - {stepInfo.main} + {meetingTitle ? meetingTitle : stepInfo.main} {stepInfo.sub}