Skip to content

Commit

Permalink
[FE] FIX: getDefaultCainbetInfo() 에서 필요없는 myInfo 인자 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
junyoung2015 committed Nov 9, 2023
1 parent 330e8b4 commit 1f8f4ed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/ProfilePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1f8f4ed

Please sign in to comment.