From 99528761fa7a130f700994c25ab8cad52dc7de0b Mon Sep 17 00:00:00 2001 From: juwon5272 Date: Mon, 25 Nov 2024 23:53:47 +0900 Subject: [PATCH 01/11] =?UTF-8?q?[FE][Reafactor]=20#14=20:=20=EB=B0=94?= =?UTF-8?q?=ED=85=80=EC=8B=9C=ED=8A=B8=20=EB=A7=A4=EB=81=84=EB=9F=BD?= =?UTF-8?q?=EA=B2=8C=20=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/component/bottomsheet/BottomSheet.tsx | 81 +++++++++++-------- 1 file changed, 47 insertions(+), 34 deletions(-) diff --git a/frontend/src/component/bottomsheet/BottomSheet.tsx b/frontend/src/component/bottomsheet/BottomSheet.tsx index 661fa928..cf46ee2d 100644 --- a/frontend/src/component/bottomsheet/BottomSheet.tsx +++ b/frontend/src/component/bottomsheet/BottomSheet.tsx @@ -1,5 +1,4 @@ -import React from 'react'; -import { useBottomSheet } from '@/hooks/useBottomSheet'; +import React, { useState, useRef } from 'react'; interface IBottomSheetProps { minHeight: number; @@ -7,47 +6,61 @@ interface IBottomSheetProps { children: React.ReactNode; } -/** - * `BottomSheet` 컴포넌트는 하단에서 올라오는 시트 형태의 UI를 제공합니다. - * - * @param {IBottomSheetProps} props - `children`을 포함한 컴포넌트 속성 - * @param {number} props.minHeight - Bottom Sheet의 최소 높이를 화면 비율로 나타냅니다 (0.0 - 1.0). - * @param {number} props.maxHeight - Bottom Sheet의 최대 높이를 화면 비율로 나타냅니다 (0.0 - 1.0). - * @param {ReactNode} props.children - Bottom Sheet 내부에 렌더링할 콘텐츠입니다. - * @returns {ReactNode} - 하단 시트를 렌더링합니다. - * - * @remarks - * - 드래그 동작을 통해 시트를 열고 닫을 수 있습니다. - * - `useBottomSheet` 훅을 사용하여 위치 및 드래그 동작을 관리합니다. - * - `minHeight`는 Bottom Sheet가 닫힌 상태의 높이 비율을 나타냅니다. - * - `maxHeight`는 Bottom Sheet가 열린 상태의 최대 높이 비율을 나타냅니다. - * - * @example - * ```tsx - * - *
- *

예시 콘텐츠

- *

BottomSheet의 children

- *
- *
- * ``` - */ - -export const BottomSheet = (props: IBottomSheetProps) => { - const { sheet } = useBottomSheet({ minHeight: props.minHeight, maxHeight: props.maxHeight }); +export const BottomSheet = ({ minHeight, maxHeight, children }: IBottomSheetProps) => { + const [sheetHeight, setSheetHeight] = useState(minHeight); + const startY = useRef(0); + const startHeight = useRef(minHeight); + + const handleStart = (y: number) => { + startY.current = y; + startHeight.current = sheetHeight; + }; + + const handleMove = (y: number) => { + const deltaY = startY.current - y; + const newHeight = startHeight.current + deltaY / window.innerHeight; + setSheetHeight(Math.max(minHeight, Math.min(maxHeight, newHeight))); + }; + + const handleTouchStart = (e: React.TouchEvent) => { + handleStart(e.touches[0].clientY); + }; + + const handleTouchMove = (e: React.TouchEvent) => { + handleMove(e.touches[0].clientY); + }; + + const handleMouseMove = (e: MouseEvent) => { + handleMove(e.clientY); + }; + + const handleMouseUp = () => { + window.removeEventListener('mousemove', handleMouseMove); + window.removeEventListener('mouseup', handleMouseUp); + }; + + const handleMouseDown = (e: React.MouseEvent) => { + handleStart(e.clientY); + window.addEventListener('mousemove', handleMouseMove); + window.addEventListener('mouseup', handleMouseUp); + }; return (
- {props.children} + +
{children}
); }; From 8bed5a8880105c81d7d68ed312b6c2dd9c612bbe Mon Sep 17 00:00:00 2001 From: juwon5272 Date: Tue, 26 Nov 2024 00:12:15 +0900 Subject: [PATCH 02/11] =?UTF-8?q?[FE][Feat]=20#28=20:=20=EB=A1=9C=EA=B7=B8?= =?UTF-8?q?=EC=9D=B8=20=EC=9C=A0=EB=AC=B4=EC=97=90=20=EB=94=B0=EB=9D=BC=20?= =?UTF-8?q?=EB=B0=94=ED=85=80=EC=8B=9C=ED=8A=B8=EC=9D=98=20=EC=A0=95?= =?UTF-8?q?=EB=B3=B4=EB=A5=BC=20=EB=B3=B4=EC=97=AC=EC=A4=80=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/pages/Main.tsx | 106 ++++++++++++++++++++++++------------ 1 file changed, 72 insertions(+), 34 deletions(-) diff --git a/frontend/src/pages/Main.tsx b/frontend/src/pages/Main.tsx index 7ecea493..2c54ec3a 100644 --- a/frontend/src/pages/Main.tsx +++ b/frontend/src/pages/Main.tsx @@ -7,33 +7,11 @@ import { FooterContext } from '@/component/layout/footer/LayoutFooterProvider'; import { useNavigate } from 'react-router-dom'; import { NaverMap } from '@/component/maps/NaverMapSample.tsx'; import { buttonActiveType } from '@/component/layout/enumTypes'; -import { loadLocalData, saveLocalData } from '@/utils/common/manageLocalData.ts'; +import { loadLocalData, saveLocalData, removeLocalData } from '@/utils/common/manageLocalData.ts'; import { AppConfig } from '@/constants.ts'; import { v4 as uuidv4 } from 'uuid'; - -const contentData = [ - { - id: '1', - title: '아들네 집으로', - time: '0시간 34분', - person: 2, - link: '/test1', - }, - { - id: '2', - title: '손자네 집으로', - time: '2시간 32분', - person: 0, - link: '/test2', - }, - { - id: '3', - title: '마을회관으로', - time: '0시간 12분', - person: 1, - link: '/test3', - }, -]; +import { AuthModal } from '@/component/authmodal/AuthModal'; +import { getUserChannels } from '@/api/channel.api.ts'; export const Main = () => { const { setFooterTitle, setFooterTransparency, setFooterOnClick, setFooterActive } = @@ -41,10 +19,30 @@ export const Main = () => { const { lat, lng, error } = getUserLocation(); const navigate = useNavigate(); const [otherLocations, setOtherLocations] = useState([]); - const MIN_HEIGHT = 0.5; - const MAX_HEIGHT = 0.8; + const MIN_HEIGHT = 0.35; + const MAX_HEIGHT = 0.9; + const [isLoggedIn, setIsLoggedIn] = useState(false); + const [showLoginModal, setShowLoginModal] = useState(false); + const [channels, setChannels] = useState([]); + + useEffect(() => { + const token = loadLocalData(AppConfig.KEYS.LOGIN_TOKEN); + setIsLoggedIn(!!token); + + if (token) { + const userId = loadLocalData(AppConfig.KEYS.LOGIN_USER); + if (userId) { + getUserChannels(userId) + .then(response => { + if (response?.data?.channels) setChannels(response.data.channels); + }) + .catch(err => { + console.error('채널 찾기 실패 : ', err); + }); + } + } + }, []); - // eslint-disable-next-line consistent-return useEffect(() => { if (lat && lng) { if (!loadLocalData(AppConfig.KEYS.BROWSER_TOKEN)) { @@ -76,6 +74,7 @@ export const Main = () => { }; return () => ws.close(); } + return undefined; }, [lat, lng]); const goToAddChannel = () => { @@ -87,12 +86,35 @@ export const Main = () => { setFooterTransparency(false); setFooterActive(buttonActiveType.ACTIVE); }, []); + + const handleLoginRequest = () => { + setShowLoginModal(true); + }; + + const handleCloseLoginModal = () => { + setShowLoginModal(false); + setIsLoggedIn(true); + }; + + const handleLogout = () => { + removeLocalData(AppConfig.KEYS.LOGIN_TOKEN); + removeLocalData(AppConfig.KEYS.LOGIN_USER); + setIsLoggedIn(!isLoggedIn); + }; + + const isUserLoggedIn = loadLocalData(AppConfig.KEYS.LOGIN_TOKEN) !== null; + return (
+ {isUserLoggedIn && ( + + )}
{
- {contentData.map(item => ( - - -
-
- ))} + {isUserLoggedIn ? ( + channels.map(item => ( + + +
+
+ )) + ) : ( +
+ 로그인을 진행하여 +
+ 더 많은 기능을 +
+ 사용해보세요 +
+ )}
+ + {/* 로그인 모달 */} +
); }; From b83cc220fff29aa35a856a546e7a93c87caa6306 Mon Sep 17 00:00:00 2001 From: juwon5272 Date: Tue, 26 Nov 2024 00:17:24 +0900 Subject: [PATCH 03/11] =?UTF-8?q?[FE][Feat]=20#59=20:=20=EB=A1=9C=EA=B7=B8?= =?UTF-8?q?=EC=9D=B8=EC=8B=9C=20=EB=AA=A8=EB=8B=AC=EC=B0=BD=20=EB=8B=AB?= =?UTF-8?q?=ED=9E=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/component/authmodal/AuthModal.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/src/component/authmodal/AuthModal.tsx b/frontend/src/component/authmodal/AuthModal.tsx index b7f4b96e..bba55525 100644 --- a/frontend/src/component/authmodal/AuthModal.tsx +++ b/frontend/src/component/authmodal/AuthModal.tsx @@ -56,10 +56,11 @@ export const AuthModal = (props: IAuthModalProps) => { const handleLoginClick = () => { doLogin(loginData.id, loginData.pw) .then(el => { - if (el.data?.token && el.data?.userId) { - saveLocalData(AppConfig.KEYS.LOGIN_TOKEN, el.data.token); - saveLocalData(AppConfig.KEYS.LOGIN_USER, el.data.userId); + if (el.data?.data.token && el.data?.data.userId) { + saveLocalData(AppConfig.KEYS.LOGIN_TOKEN, el.data?.data.token); + saveLocalData(AppConfig.KEYS.LOGIN_USER, el.data?.data.userId); } + props.onClose(); // 부모 컴포넌트의 로그인 상태를 변경 window.location.reload(); }) .catch(() => { From 4350dbd8a16e4735d43550429a990c922912cae6 Mon Sep 17 00:00:00 2001 From: juwon5272 Date: Tue, 26 Nov 2024 15:00:57 +0900 Subject: [PATCH 04/11] =?UTF-8?q?[FE][Feat]=20#59=20:=20=EB=A1=9C=EA=B7=B8?= =?UTF-8?q?=EC=9D=B8,=20=ED=9A=8C=EC=9B=90=EA=B0=80=EC=9E=85=EC=8B=9C=20?= =?UTF-8?q?=EB=B6=88=EA=B0=80=EB=8A=A5=ED=95=9C=20=EA=B2=BD=EC=9A=B0=20?= =?UTF-8?q?=EC=95=88=EB=82=B4=EB=AC=B8=EA=B5=AC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/component/authmodal/AuthModal.tsx | 33 +++++++++++++++---- 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/frontend/src/component/authmodal/AuthModal.tsx b/frontend/src/component/authmodal/AuthModal.tsx index bba55525..3b4478fd 100644 --- a/frontend/src/component/authmodal/AuthModal.tsx +++ b/frontend/src/component/authmodal/AuthModal.tsx @@ -28,6 +28,7 @@ export const AuthModal = (props: IAuthModalProps) => { }); const [modalType, setModalType] = useState<'login' | 'register'>(props.type); + const [error, setError] = useState(''); const handleChange = (e: React.ChangeEvent) => { const { name, value } = e.target; @@ -46,43 +47,60 @@ export const AuthModal = (props: IAuthModalProps) => { }; const switchToRegister = () => { + setError(''); setModalType('register'); }; const switchToLogin = () => { + setError(''); setModalType('login'); }; const handleLoginClick = () => { + if (loginData.id || loginData.pw === '') { + setError('작성하지 않은 항목이 있습니다.'); + return; + } doLogin(loginData.id, loginData.pw) .then(el => { if (el.data?.data.token && el.data?.data.userId) { saveLocalData(AppConfig.KEYS.LOGIN_TOKEN, el.data?.data.token); saveLocalData(AppConfig.KEYS.LOGIN_USER, el.data?.data.userId); } - props.onClose(); // 부모 컴포넌트의 로그인 상태를 변경 + setError(''); + props.onClose(); + window.location.reload(); }) .catch(() => { - alert('아이디와 비밀번호를 다시 확인해주세요.'); + setError('아이디 혹은 비밀번호를 다시 확인해주세요.'); }); }; const handleSignUpClick = () => { if (registerData.pw !== registerData.confirmPw) { - alert('비밀번호가 일치하지 않습니다.'); + setError('비밀번호가 일치하지 않습니다.'); + return; + } + if ( + registerData.id || + registerData.email || + registerData.pw || + registerData.confirmPw || + registerData.name === '' + ) { + setError('작성하지 않은 항목이 있습니다.'); return; } doRegister(registerData.id, registerData.name, registerData.pw, registerData.email) .then(el => { if (el.data) { - alert('회원가입에 성공했습니다. 로그인해주세요.'); switchToLogin(); } }) .catch(() => { - alert( - '회원가입에 실패했습니다. 다시 확인해주세요.\nid는 4자 이상, 비밀번호는 6자리 이상이어야 합니다.', + setError( + `회원가입에 실패했습니다. 다시 확인해주세요.\nid는 4자 이상, 비밀번호는 6자리 이상이어야 합니다.`, ); }); }; @@ -106,6 +124,7 @@ export const AuthModal = (props: IAuthModalProps) => { value={loginData.pw} onChange={handleChange} /> + {error ?

{error}

: ''} { value={registerData.confirmPw} onChange={handleChange} /> + {error ?

{error}

: ''} + Date: Tue, 26 Nov 2024 15:01:41 +0900 Subject: [PATCH 05/11] =?UTF-8?q?[FE][Design]=20:=20Tailwind=20=EC=83=89?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/tailwind.config.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/tailwind.config.js b/frontend/tailwind.config.js index 325b5e83..74c5f62d 100644 --- a/frontend/tailwind.config.js +++ b/frontend/tailwind.config.js @@ -14,9 +14,12 @@ module.exports = { 75: '#E2E8F0', 100: '#EDF2F7', 150: '#AAB6C7', + 175: '#7A7A7A', + 180: '#7676801F', 200: '#6D6D6D', 400: '#555555', 800: '#3E3E3E', + 850: '#3C3C4399', 900: '#1C1C1C', }, blueGray: { From 27ab2207c2746ef4d7d374d19653beb059e38c0e Mon Sep 17 00:00:00 2001 From: juwon5272 Date: Tue, 26 Nov 2024 15:04:15 +0900 Subject: [PATCH 06/11] =?UTF-8?q?[FE][Feat]=20#14=20:=20=EB=A1=9C=EA=B7=B8?= =?UTF-8?q?=EC=9D=B8=20=EC=97=AC=EB=B6=80=EC=97=90=20=EB=94=B0=EB=9D=BC=20?= =?UTF-8?q?=EB=B0=94=ED=85=80=EC=8B=9C=ED=8A=B8=20=EC=83=89=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 --- frontend/src/pages/Main.tsx | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/frontend/src/pages/Main.tsx b/frontend/src/pages/Main.tsx index 2c54ec3a..36eab57a 100644 --- a/frontend/src/pages/Main.tsx +++ b/frontend/src/pages/Main.tsx @@ -139,27 +139,29 @@ export const Main = () => { )} - - {isUserLoggedIn ? ( - channels.map(item => ( + {isUserLoggedIn ? ( + + {channels.map(item => ( - +
- )) - ) : ( + ))} +
+ ) : ( +
- 로그인을 진행하여 -
- 더 많은 기능을 -
- 사용해보세요 +
+

로그인을 진행하여

+

더 많은 기능을

+

사용해보세요

+
- )} -
+
+ )} {/* 로그인 모달 */} From d9559f7a599cb3afafa65e56cfce9be24c928bc3 Mon Sep 17 00:00:00 2001 From: juwon5272 Date: Tue, 26 Nov 2024 15:05:42 +0900 Subject: [PATCH 07/11] =?UTF-8?q?[FE][Feat]=20#14=20:=20=EB=B0=94=ED=85=80?= =?UTF-8?q?=EC=8B=9C=ED=8A=B8=20=EB=82=B4=EC=9A=A9=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/component/content/Content.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/frontend/src/component/content/Content.tsx b/frontend/src/component/content/Content.tsx index 615d58d7..294382f3 100644 --- a/frontend/src/component/content/Content.tsx +++ b/frontend/src/component/content/Content.tsx @@ -2,7 +2,6 @@ import { MdGroup, MdMoreVert } from 'react-icons/md'; interface IContentProps { title: string; - time: string; person: number; link: string; } @@ -31,14 +30,14 @@ interface IContentProps { export const Content = (props: IContentProps) => { return (
{props.title}
- - {props.time} + {/* + {props.time} */} {props.person > 0 && ( <> From 5701b9db6e9065bf002cbf27ddafc68c268fc664 Mon Sep 17 00:00:00 2001 From: juwon5272 Date: Tue, 26 Nov 2024 16:46:11 +0900 Subject: [PATCH 08/11] =?UTF-8?q?[FE][Feat]=20#14=20:=20=EB=B0=94=ED=85=80?= =?UTF-8?q?=EC=8B=9C=ED=8A=B8=20=EB=82=B4=EC=9A=A9=EC=97=90=20=EC=9D=B8?= =?UTF-8?q?=EC=9B=90=EC=88=98,=20=EC=83=9D=EC=84=B1=EB=82=A0=EC=A7=9C=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 --- frontend/src/api/dto/channel.dto.ts | 2 ++ frontend/src/component/content/Content.tsx | 16 ++++++++++++++-- frontend/src/pages/Main.tsx | 13 +++++++++---- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/frontend/src/api/dto/channel.dto.ts b/frontend/src/api/dto/channel.dto.ts index 58150eeb..fc198545 100644 --- a/frontend/src/api/dto/channel.dto.ts +++ b/frontend/src/api/dto/channel.dto.ts @@ -52,6 +52,8 @@ export class channelListEntity { name: string | undefined; generated_at: string | undefined; + + guest_count: number | undefined; } export class getUserChannelsResEntity { diff --git a/frontend/src/component/content/Content.tsx b/frontend/src/component/content/Content.tsx index 294382f3..f4525f36 100644 --- a/frontend/src/component/content/Content.tsx +++ b/frontend/src/component/content/Content.tsx @@ -4,6 +4,7 @@ interface IContentProps { title: string; person: number; link: string; + time: string; } /** @@ -28,6 +29,16 @@ interface IContentProps { */ export const Content = (props: IContentProps) => { + const formattedDate = new Date(props.time).toLocaleDateString('ko-KR', { + year: 'numeric', + month: '2-digit', + day: '2-digit', + }); + + const formattedTime = new Date(props.time).toLocaleTimeString('ko-KR', { + hour: '2-digit', + minute: '2-digit', + }); return ( {
{props.title}
- {/* - {props.time} */} + {props.person > 0 && ( <> diff --git a/frontend/src/pages/Main.tsx b/frontend/src/pages/Main.tsx index 36eab57a..f0c3d42a 100644 --- a/frontend/src/pages/Main.tsx +++ b/frontend/src/pages/Main.tsx @@ -2,7 +2,7 @@ import { Fragment, useContext, useEffect, useState } from 'react'; import { getUserLocation } from '@/hooks/getUserLocation'; import { BottomSheet } from '@/component/bottomsheet/BottomSheet'; import { Content } from '@/component/content/Content'; -import { MdFormatListBulleted } from 'react-icons/md'; +import { MdFormatListBulleted, MdLogout } from 'react-icons/md'; import { FooterContext } from '@/component/layout/footer/LayoutFooterProvider'; import { useNavigate } from 'react-router-dom'; import { NaverMap } from '@/component/maps/NaverMapSample.tsx'; @@ -112,7 +112,7 @@ export const Main = () => { {isUserLoggedIn && ( )} @@ -143,7 +143,12 @@ export const Main = () => { {channels.map(item => ( - +
))} @@ -151,7 +156,7 @@ export const Main = () => { ) : (
From d8535a2dbba2e58f6bb137e019ee74ce8fc8a378 Mon Sep 17 00:00:00 2001 From: juwon5272 Date: Tue, 26 Nov 2024 16:48:19 +0900 Subject: [PATCH 09/11] =?UTF-8?q?[FE][Fix]=20:=20=EC=98=A4=EB=A5=98=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/channel.api.ts | 4 ++-- .../src/component/authmodal/AuthModal.tsx | 14 ------------ .../src/component/bottomsheet/BottomSheet.tsx | 22 ++++++++++++++++++- 3 files changed, 23 insertions(+), 17 deletions(-) diff --git a/frontend/src/api/channel.api.ts b/frontend/src/api/channel.api.ts index b1eb3aad..4644f31d 100644 --- a/frontend/src/api/channel.api.ts +++ b/frontend/src/api/channel.api.ts @@ -21,7 +21,7 @@ export const createChannel = ( console.error(res); fnReject(`msg.${res}`); } else { - fnResolve(new ResponseDto(res)); + fnResolve(new ResponseDto(res.data)); } }) .catch(err => { @@ -45,7 +45,7 @@ export const getUserChannels = (userId: string): Promise(res)); + fnResolve(new ResponseDto(res.data)); } }) .catch(err => { diff --git a/frontend/src/component/authmodal/AuthModal.tsx b/frontend/src/component/authmodal/AuthModal.tsx index 3b4478fd..a09174da 100644 --- a/frontend/src/component/authmodal/AuthModal.tsx +++ b/frontend/src/component/authmodal/AuthModal.tsx @@ -57,10 +57,6 @@ export const AuthModal = (props: IAuthModalProps) => { }; const handleLoginClick = () => { - if (loginData.id || loginData.pw === '') { - setError('작성하지 않은 항목이 있습니다.'); - return; - } doLogin(loginData.id, loginData.pw) .then(el => { if (el.data?.data.token && el.data?.data.userId) { @@ -82,16 +78,6 @@ export const AuthModal = (props: IAuthModalProps) => { setError('비밀번호가 일치하지 않습니다.'); return; } - if ( - registerData.id || - registerData.email || - registerData.pw || - registerData.confirmPw || - registerData.name === '' - ) { - setError('작성하지 않은 항목이 있습니다.'); - return; - } doRegister(registerData.id, registerData.name, registerData.pw, registerData.email) .then(el => { if (el.data) { diff --git a/frontend/src/component/bottomsheet/BottomSheet.tsx b/frontend/src/component/bottomsheet/BottomSheet.tsx index cf46ee2d..83845649 100644 --- a/frontend/src/component/bottomsheet/BottomSheet.tsx +++ b/frontend/src/component/bottomsheet/BottomSheet.tsx @@ -3,10 +3,16 @@ import React, { useState, useRef } from 'react'; interface IBottomSheetProps { minHeight: number; maxHeight: number; + backgroundColor: string; children: React.ReactNode; } -export const BottomSheet = ({ minHeight, maxHeight, children }: IBottomSheetProps) => { +export const BottomSheet = ({ + minHeight, + maxHeight, + backgroundColor, + children, +}: IBottomSheetProps) => { const [sheetHeight, setSheetHeight] = useState(minHeight); const startY = useRef(0); const startHeight = useRef(minHeight); @@ -45,10 +51,15 @@ export const BottomSheet = ({ minHeight, maxHeight, children }: IBottomSheetProp window.addEventListener('mouseup', handleMouseUp); }; + const handleClose = () => { + setSheetHeight(minHeight); + }; + return (
+
+ +
{children}
From b5c2469a825a8f7fcd84789b70947c4be9453698 Mon Sep 17 00:00:00 2001 From: juwon5272 Date: Tue, 26 Nov 2024 17:16:40 +0900 Subject: [PATCH 10/11] =?UTF-8?q?[FE][Feat]=20:=20DTO=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/dto/auth.dto.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/frontend/src/api/dto/auth.dto.ts b/frontend/src/api/dto/auth.dto.ts index 528a074a..9d63e921 100644 --- a/frontend/src/api/dto/auth.dto.ts +++ b/frontend/src/api/dto/auth.dto.ts @@ -1,7 +1,11 @@ export class LoginResEntity { - token: string | undefined; - - userId: string | undefined; + data: { + token: string | undefined; + userId: string | undefined; + } = { + token: undefined, + userId: undefined, + }; } export class RegisterResEntity { From 5fc5f049c5baaf1a5d4ee0407158b2836e8d0639 Mon Sep 17 00:00:00 2001 From: juwon5272 Date: Tue, 26 Nov 2024 17:19:16 +0900 Subject: [PATCH 11/11] =?UTF-8?q?[FE][Fix]=20:=20=EC=B6=A9=EB=8F=8C=20?= =?UTF-8?q?=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/pages/Main.tsx | 3 --- 1 file changed, 3 deletions(-) diff --git a/frontend/src/pages/Main.tsx b/frontend/src/pages/Main.tsx index ddb00cd9..f4fb9609 100644 --- a/frontend/src/pages/Main.tsx +++ b/frontend/src/pages/Main.tsx @@ -1,6 +1,5 @@ import { Fragment, useContext, useEffect, useState } from 'react'; import { MdFormatListBulleted, MdLogout } from 'react-icons/md'; -import { MdFormatListBulleted } from 'react-icons/md'; import { FooterContext } from '@/component/layout/footer/LayoutFooterProvider'; import { useNavigate } from 'react-router-dom'; import { buttonActiveType } from '@/component/layout/enumTypes'; @@ -9,13 +8,11 @@ import { AuthModal } from '@/component/authmodal/AuthModal'; import { getUserChannels } from '@/api/channel.api.ts'; import { BottomSheet } from '@/component/bottomsheet/BottomSheet.tsx'; import { Content } from '@/component/content/Content.tsx'; -import { loadLocalData, saveLocalData } from '@/utils/common/manageLocalData.ts'; import { AppConfig } from '@/lib/constants/commonConstants.ts'; import { v4 as uuidv4 } from 'uuid'; import { getUserLocation } from '@/hooks/getUserLocation.ts'; import { MapCanvasForView } from '@/component/canvasWithMap/canvasWithMapForView/MapCanvasForView.tsx'; - export const Main = () => { const { setFooterTitle, setFooterTransparency, setFooterOnClick, setFooterActive } = useContext(FooterContext);