Skip to content

Commit

Permalink
refactor : 필요 없는 코드 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
jinoo0306 committed Jun 23, 2024
1 parent dfe6ca3 commit 79082c0
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/app/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import category from '@/util/category.json';
import { useQuery } from '@tanstack/react-query';
import { login, logout } from '@/api/user.ts';
import ignorePath from '../styles/ignorePath.ts';
import { getCookie, removeCookie } from '../cookies.tsx';
import { removeCookie } from '../cookies.tsx';

const mont = Montserrat({ subsets: ['latin'], weight: ['500'] });

Expand All @@ -20,18 +20,11 @@ function Header() {
const router = useRouter();
const path = usePathname() || '';

const { data, isLoading, isError } = useQuery({
const { data, isLoading } = useQuery({
queryKey: ['login'],
queryFn: login,
});

// 토큰이 있는데 401 에러가 발생하면 새로고침
if (isError && getCookie('accessToken')) {
// setTimeout(() => {
// window.location.reload();
// }, 100);
}

if (ignorePath().includes(path)) {
return null;
}
Expand Down

0 comments on commit 79082c0

Please sign in to comment.