BaseLayout.tsx 402 Bytes
Newer Older
Yoon, Daeki's avatar
Yoon, Daeki committed
1
import React from "react";
2
3
import { Outlet, useNavigate } from "react-router-dom";
import { useAxiosInterceptor } from "../apis";
Yoon, Daeki's avatar
Yoon, Daeki committed
4
5
6
7
import { AuthProvider } from "../auth";
import { Header } from "../commons";

export const BaseLayout = () => {
8
9
10
  const navigate = useNavigate();
  useAxiosInterceptor(navigate);

Yoon, Daeki's avatar
Yoon, Daeki committed
11
12
13
14
15
16
17
  return (
    <AuthProvider>
      <Header />
      <Outlet />
    </AuthProvider>
  );
};