From 1f8f4ed81454b82f4b26e556dc8ac437ca87b6c9 Mon Sep 17 00:00:00 2001 From: jusohn Date: Thu, 9 Nov 2023 11:04:32 +0900 Subject: [PATCH] =?UTF-8?q?[FE]=20FIX:=20getDefaultCainbetInfo()=20?= =?UTF-8?q?=EC=97=90=EC=84=9C=20=ED=95=84=EC=9A=94=EC=97=86=EB=8A=94=20myI?= =?UTF-8?q?nfo=20=EC=9D=B8=EC=9E=90=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/TopNav/TopNavButtonGroup/TopNavButtonGroup.tsx | 4 ++-- frontend/src/pages/ProfilePage.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/TopNav/TopNavButtonGroup/TopNavButtonGroup.tsx b/frontend/src/components/TopNav/TopNavButtonGroup/TopNavButtonGroup.tsx index f1de85a82..43f18a37d 100644 --- a/frontend/src/components/TopNav/TopNavButtonGroup/TopNavButtonGroup.tsx +++ b/frontend/src/components/TopNav/TopNavButtonGroup/TopNavButtonGroup.tsx @@ -19,7 +19,7 @@ import { } from "@/api/axios/axios.custom"; import useMenu from "@/hooks/useMenu"; -export const getDefaultCabinetInfo = (myInfo: UserDto): CabinetInfo => ({ +export const getDefaultCabinetInfo = () => ({ building: "", floor: 0, cabinetId: 0, @@ -44,7 +44,7 @@ const TopNavButtonGroup = ({ isAdmin }: { isAdmin?: boolean }) => { const [myCabinetInfo, setMyCabinetInfo] = useRecoilState(myCabinetInfoState); const { pathname } = useLocation(); const navigator = useNavigate(); - const defaultCabinetInfo = getDefaultCabinetInfo(myInfo); + const defaultCabinetInfo = getDefaultCabinetInfo(); const resetCabinetInfo = () => { setMyCabinetInfo({ ...defaultCabinetInfo, diff --git a/frontend/src/pages/ProfilePage.tsx b/frontend/src/pages/ProfilePage.tsx index 91570b4ef..9ecd46118 100644 --- a/frontend/src/pages/ProfilePage.tsx +++ b/frontend/src/pages/ProfilePage.tsx @@ -14,7 +14,7 @@ const ProfilePage = () => { const [isLoading, setIsLoading] = useState(true); const [myCabinetInfo, setMyCabinetInfo] = useRecoilState(myCabinetInfoState); const myInfo = useRecoilValue(userState); - const defaultCabinetInfo = getDefaultCabinetInfo(myInfo); + const defaultCabinetInfo = getDefaultCabinetInfo(); useEffect(() => { setIsLoading(true);