From 1d18ef0739066f1053e578c1f9a692ac43cabf24 Mon Sep 17 00:00:00 2001 From: kcwww Date: Wed, 6 Dec 2023 12:09:01 +0900 Subject: [PATCH] fix: build error --- front/src/pages/Intro/MsgBox.tsx | 1 + front/src/pages/Main/Main.tsx | 22 +++++++++---------- .../pages/Make/Snowball/MainDeco/MsgBox.tsx | 1 + 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/front/src/pages/Intro/MsgBox.tsx b/front/src/pages/Intro/MsgBox.tsx index 05d1d32..e766fdf 100644 --- a/front/src/pages/Intro/MsgBox.tsx +++ b/front/src/pages/Intro/MsgBox.tsx @@ -15,6 +15,7 @@ const MsgBox = () => { content={message} sender={sender} to={userData.nickname} + isDeco={false} /> ) : null} diff --git a/front/src/pages/Main/Main.tsx b/front/src/pages/Main/Main.tsx index 7c07955..65ac6b8 100644 --- a/front/src/pages/Main/Main.tsx +++ b/front/src/pages/Main/Main.tsx @@ -55,19 +55,19 @@ const Main = () => { const leftArrowRef = useRef(null); const rightArrowRef = useRef(null); - const saveCookie = () => { - const cookieToken = import.meta.env.VITE_APP_COOKIE_TOKEN; - const cookieName = 'access_token'; - const cookieValue = cookieToken; - const today = new Date(); - const expire = new Date(); - const secure = true; - expire.setDate(today.getDate() + 1); - document.cookie = `${cookieName}=${cookieValue}; expires=${expire.toUTCString()}; secure=${secure}; path=/`; - }; + // const saveCookie = () => { + // const cookieToken = import.meta.env.VITE_APP_COOKIE_TOKEN; + // const cookieName = 'access_token'; + // const cookieValue = cookieToken; + // const today = new Date(); + // const expire = new Date(); + // const secure = true; + // expire.setDate(today.getDate() + 1); + // document.cookie = `${cookieName}=${cookieValue}; expires=${expire.toUTCString()}; secure=${secure}; path=/`; + // }; useEffect(() => { - saveCookie(); + //saveCookie(); axios .get('/api/user', { withCredentials: true // axios 쿠키 값 전달 diff --git a/front/src/pages/Make/Snowball/MainDeco/MsgBox.tsx b/front/src/pages/Make/Snowball/MainDeco/MsgBox.tsx index ebd95fa..0a38210 100644 --- a/front/src/pages/Make/Snowball/MainDeco/MsgBox.tsx +++ b/front/src/pages/Make/Snowball/MainDeco/MsgBox.tsx @@ -28,6 +28,7 @@ const MsgBox = ({ isInput }: MsgBoxProps) => { isInput={isInput} content={''} sender={''} + isDeco={true} /> );