text: import React from 'react';
  import ReactDOM from 'react-dom';
  
  import './index.css';
  import { BrowserRouter } from 'react-router-dom'
  import App from './App';
  import { applyMiddleware, createStore } from 'redux';
  import { Provider } from 'react-redux';
  import rootReducer, { rootSaga } from './modules'
  import { check } from './modules/user'
  import { composeWithDevTools } from 'redux-devtools-extension';
  import createSagaMiddleware from 'redux-saga';
  import reportWebVitals from './reportWebVitals';
  const sagaMiddleware = createSagaMiddleware();
  const store = createStore(rootReducer, composeWithDevTools(applyMiddleware(sagaMiddleware)));
  
  function loadUser() {
    try {
      const token = localStorage.getItem('jwttoken');
      if (!token) {
        console.log('토큰 없음')
        return;
      }
      console.log(`로컬에서 토큰 ${token}`)
      store.dispatch(check(token));
    } catch (e) {
      console.log('localStorage가 작동하지 않습니다.')
    }
  }
  sagaMiddleware.run(rootSaga);
  loadUser();
  
  ReactDOM.render(
    <Provider store={store}>
      <BrowserRouter>
        <App />
      </BrowserRouter>
    </Provider>,
    document.getElementById('root')
  );
  
  // If you want to start measuring performance in your app, pass a function
  // to log results (for example: reportWebVitals(console.log))
  // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
  reportWebVitals();
  