Skip to content

Commit

Permalink
fix: TopNav navigate ๋ณ€๊ฒฝ
Browse files Browse the repository at this point in the history
  • Loading branch information
Todari committed Jul 23, 2024
1 parent 29bfb4c commit 7ba559e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions HDesign/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion HDesign/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "haengdong-design",
"version": "0.1.18",
"version": "0.1.19",
"description": "",
"main": "./dist/index.js",
"module": "./dist/index.js",
Expand Down
5 changes: 2 additions & 3 deletions HDesign/src/components/TopNav/TopNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,14 @@ import {useEffect, useState} from 'react';
const TopNav = ({navType}: TopNavProps) => {
const [nav, setNav] = useState('ํ™ˆ');
const navigate = useNavigate();
const location = useLocation();

useEffect(() => {
navigate(PATH_TABLE[nav]);
}, [nav]);

const PATH_TABLE: Record<string, string> = {
ํ™ˆ: '/',
๊ด€๋ฆฌ: '/admin',
ํ™ˆ: './',
๊ด€๋ฆฌ: './admin',
};

const TopNavByType = () => {
Expand Down

0 comments on commit 7ba559e

Please sign in to comment.