diff --git a/frontend/src/Cabinet/components/LeftNav/LeftSectionNav/LeftSectionNav.tsx b/frontend/src/Cabinet/components/LeftNav/LeftSectionNav/LeftSectionNav.tsx index 67e37e4c4..5939a9405 100644 --- a/frontend/src/Cabinet/components/LeftNav/LeftSectionNav/LeftSectionNav.tsx +++ b/frontend/src/Cabinet/components/LeftNav/LeftSectionNav/LeftSectionNav.tsx @@ -1,3 +1,4 @@ +import { useLocation } from "react-router-dom"; import { useRecoilValue } from "recoil"; import { useRecoilState } from "recoil"; import styled from "styled-components"; @@ -16,6 +17,8 @@ const LeftSectionNav = ({ closeLeftNav }: { closeLeftNav: () => void }) => { const [currentFloorSection, setCurrentFloorSection] = useRecoilState( currentSectionNameState ); + const { pathname } = useLocation(); + const isAdmin = pathname.includes("admin"); return ( @@ -40,7 +43,8 @@ const LeftSectionNav = ({ closeLeftNav }: { closeLeftNav: () => void }) => { > {section.sectionName} - {!isClubSection && + {!isAdmin && + !isClubSection && (section.alarmRegistered ? ( ) : (