Skip to content

Commit

Permalink
[FE] HOTFIX: 루트 url에 접속시 /home으로 이동안되는 버그 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
jnkeniaem committed Nov 20, 2024
1 parent 8af13a1 commit 59fa238
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions frontend/src/Cabinet/components/TopNav/TopNav.container.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import React, { useEffect, useState } from "react";
import { useLocation, useNavigate } from "react-router-dom";
import { useRecoilState, useRecoilValue } from "recoil";
import { currentBuildingNameState } from "@/Cabinet/recoil/atoms";
import { buildingsState } from "@/Cabinet/recoil/selectors";
import TopNav from "@/Cabinet/components/TopNav/TopNav";
import { staticColNumData } from "@/Cabinet/assets/data/sectionColNumData";
import useMenu from "@/Cabinet/hooks/useMenu";

const TopNavContainer: React.FC = () => {
Expand All @@ -14,8 +12,6 @@ const TopNavContainer: React.FC = () => {
);
const buildingsList = useRecoilValue<Array<string>>(buildingsState);
const { toggleLeftNav } = useMenu();
const navigator = useNavigate();
const isLocation = useLocation();

const onClickLogo = () => {
toggleLeftNav();
Expand All @@ -26,13 +22,6 @@ const TopNavContainer: React.FC = () => {
setCurrentBuildingName(buildingsList[0]);
}, [buildingsList]);

useEffect(() => {
if (currentBuildingName === undefined) return;
else if (currentBuildingName === staticColNumData[0].building) {
navigator(isLocation);
}
}, [currentBuildingName]);

return (
<TopNav
currentBuildingName={currentBuildingName}
Expand Down

0 comments on commit 59fa238

Please sign in to comment.