import React from 'react';
import { cache } from '@zenview/micro-utils';
import { Route, Switch, BrowserRouter } from 'react-router-dom';
import DocView from './docs';
import ThemeAntd from './themeComponents/ThemeAntd';
import { BaseStore } from '@zenview/micro-basic-library';
import { Provider } from 'mobx-react';
import { userInfo } from './mock';

cache.setCache('token', userInfo.token, 'session');

export default function App() {
  return (
    <Provider {...BaseStore}>
      <ThemeAntd>
        <BrowserRouter>
          <Switch>
            <Route path="/doc" component={DocView} />
          </Switch>
        </BrowserRouter>
      </ThemeAntd>
    </Provider>
  );
}
