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);