Skip to content

Commit

Permalink
Merge pull request #1711 from innovationacademy-kr/dev
Browse files Browse the repository at this point in the history
DEV TO MAIN
  • Loading branch information
jnkeniaem authored Nov 20, 2024
2 parents 2017e00 + 59fa238 commit 56d45b5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 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
6 changes: 5 additions & 1 deletion frontend/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ import { GlobalStyle } from "@/Cabinet/assets/data/ColorTheme";
Sentry.init({
dsn: import.meta.env.VITE_SENTRY_DSN,
environment:
import.meta.env.VITE_IS_LOCAL === "true" ? "local" : "production",
import.meta.env.VITE_IS_LOCAL === "true"
? "local"
: import.meta.env.VITE_BE_HOST.includes("dev")
? "development"
: "production",
release: "^8.18.0",
integrations: [
// See docs for support of different versions of variation of react router
Expand Down

0 comments on commit 56d45b5

Please sign in to comment.