forked from ALLPASStival/project-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclient.tsx
31 lines (27 loc) · 896 Bytes
/
client.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import "core-js/stable";
import "regenerator-runtime/runtime";
import React from "react";
import { render } from "react-dom";
import { BrowserRouter } from "react-router-dom";
import axios from "axios";
import { Provider } from "react-redux";
import { store } from "./redux/store";
import { persistStore } from "redux-persist"; // 추가
import { PersistGate } from "redux-persist/integration/react";
import App from "./layouts/App";
axios.defaults.withCredentials = true;
axios.defaults.baseURL =
process.env.NODE_ENV === "production"
? "https://AllPasstival"
: "http://localhost:3090";
export let persistor = persistStore(store); // 추가
render(
<BrowserRouter>
<Provider store={store}>
<PersistGate loading={<div>로딩중...</div>} persistor={persistor}>
<App />
</PersistGate>
</Provider>
</BrowserRouter>,
document.querySelector("#app")
);