MainWrapper.tsx 807 B

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