Skip to content

Commit

Permalink
test: 401 체크하는 useAxiosResponse위치 Layoutprovider로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
cweedlee committed Sep 2, 2024
1 parent 9420412 commit ca333ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Layout/LayoutProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import AdminAppLayout from 'Layout/AdminLayout';
import AgendaAppLayout from 'Layout/AgendaLayout';
import TakguAppLayout from 'Layout/TakguLayout';
import { usePathname } from 'hooks/agenda/Layout/usePathname';
import useAxiosResponse from 'hooks/useAxiosResponse';

type LayoutProviderProps = {
children: React.ReactNode;
Expand All @@ -13,6 +14,7 @@ type LayoutProviderProps = {
// 로그인 스테이트 등은 각 레이아웃에서 확인
const LayoutProvider = ({ children }: LayoutProviderProps) => {
const isLogin = useRecoilValue(loginState);
useAxiosResponse();
console.log(isLogin);
const app = usePathname();
switch (app) {
Expand Down
2 changes: 1 addition & 1 deletion Layout/TakguLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function TakguLayout({ children }: TakguLayoutProps) {
const presentPath = usePathname();
const openCurrentMatch = useRecoilValue(openCurrentMatchState);

useAxiosResponse();
// useAxiosResponse();
useGetUserSeason(presentPath);
useSetAfterGameModal();
useLiveCheck(presentPath);
Expand Down

0 comments on commit ca333ba

Please sign in to comment.