MainWrapper.tsx 592 B

1234567891011121314151617181920212223
  1. import React, { Component } from "react";
  2. import { BrowserRouter } from "react-router-dom";
  3. import { ContextProvider } from "../shared/Context";
  4. import Main from "./Main";
  5. import { RouteComponentProps, withRouter } from "react-router";
  6. type PropsType = RouteComponentProps & {};
  7. type StateType = {};
  8. class MainWrapper extends Component<PropsType, StateType> {
  9. render() {
  10. let { history, location } = this.props;
  11. return (
  12. <ContextProvider history={history} location={location}>
  13. <Main />
  14. </ContextProvider>
  15. );
  16. }
  17. }
  18. export default withRouter(MainWrapper);