From b64246d8461dbb1d7b275a41b68e017172e66c63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=80=EC=A7=80?= <103625348+eunji-0623@users.noreply.github.com> Date: Wed, 31 Jul 2024 23:39:16 +0900 Subject: [PATCH 1/3] =?UTF-8?q?Fix:=20=EB=A1=9C=EA=B7=B8=EC=95=84=EC=9B=83?= =?UTF-8?q?=20=EC=8B=9C=20socket=20=EC=97=B0=EA=B2=B0=20=EB=81=8A=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hooks/useLogout.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hooks/useLogout.ts b/hooks/useLogout.ts index 04a755f..83b0305 100644 --- a/hooks/useLogout.ts +++ b/hooks/useLogout.ts @@ -3,6 +3,7 @@ import useLoginState from './useLoginState'; import { useRecoilState, useResetRecoilState, useSetRecoilState } from 'recoil'; import { userDefaultState, userState } from '@/states/userState'; import { useQueryClient } from '@tanstack/react-query'; +import socket from '@/server/server'; export default function useLogout() { const { setIsLoggedIn } = useLoginState(); @@ -19,6 +20,7 @@ export default function useLogout() { sessionStorage.removeItem('refreshToken'); sessionStorage.removeItem('userId'); setIsLoggedIn(false); + socket.disconnect(); route.push('/'); }; From e90b4595c017422c8c11e69b3146efcc9d467b73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=80=EC=A7=80?= <103625348+eunji-0623@users.noreply.github.com> Date: Wed, 31 Jul 2024 23:47:39 +0900 Subject: [PATCH 2/3] =?UTF-8?q?Fix:=20=EC=B1=84=ED=8C=85=20=EC=9E=85?= =?UTF-8?q?=EB=A0=A5=20=EC=95=88=ED=96=88=EC=9D=84=20=EB=95=8C=20=EC=A0=84?= =?UTF-8?q?=EC=86=A1=EB=90=98=EC=A7=80=20=EC=95=8A=EB=8F=84=EB=A1=9D=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 --- components/Popup/ChatPopup.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/components/Popup/ChatPopup.tsx b/components/Popup/ChatPopup.tsx index 9ed5402..31546dd 100644 --- a/components/Popup/ChatPopup.tsx +++ b/components/Popup/ChatPopup.tsx @@ -32,6 +32,7 @@ function ChatPopup({ const sendMessage = (event: any) => { event.preventDefault(); + if (message === '') return; if (isAdmin) { socket.emit( 'sendMessageAdmin', From 8cee3a8f428a49effc72f97be6b21641a7c2d9ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=80=EC=A7=80?= <103625348+eunji-0623@users.noreply.github.com> Date: Fri, 2 Aug 2024 14:05:34 +0900 Subject: [PATCH 3/3] =?UTF-8?q?Fix:=20=EB=AA=A8=EB=B0=94=EC=9D=BC=20top=20?= =?UTF-8?q?button=20=EC=9C=84=EC=B9=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/Button/TopButton.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/components/Button/TopButton.tsx b/components/Button/TopButton.tsx index 5d0e046..547146b 100644 --- a/components/Button/TopButton.tsx +++ b/components/Button/TopButton.tsx @@ -1,8 +1,11 @@ import Image from 'next/image'; import React, { useState, useEffect } from 'react'; +import { useRouter } from 'next/router'; const TopButton = () => { const [showButton, setShowButton] = useState(false); + const router = useRouter(); + const isActivityDetailPage = router.pathname.startsWith('/activity-details/'); const scrollToTop = () => { window.scroll({ @@ -26,7 +29,13 @@ const TopButton = () => { return ( <> {showButton && ( -
+