import { Component, ReactElement } from 'react'; import { inject, observer } from 'mobx-react'; import { Route } from 'react-router'; import { Navigate, Routes, unstable_HistoryRouter as HistoryRouter, } from 'react-router-dom'; import AppLayoutContainer from './containers/layout/AppLayoutContainer'; import SettingsWindow from './containers/settings/SettingsWindow'; import RecipesScreen from './containers/settings/RecipesScreen'; import ServicesScreen from './containers/settings/ServicesScreen'; import EditServiceScreen from './containers/settings/EditServiceScreen'; import AccountScreen from './containers/settings/AccountScreen'; import TeamScreen from './containers/settings/TeamScreen'; import EditUserScreen from './containers/settings/EditUserScreen'; import EditSettingsScreen from './containers/settings/EditSettingsScreen'; import InviteSettingsScreen from './containers/settings/InviteScreen'; import SupportFerdiumScreen from './containers/settings/SupportScreen'; import WelcomeScreen from './containers/auth/WelcomeScreen'; import LoginScreen from './containers/auth/LoginScreen'; import PasswordScreen from './containers/auth/PasswordScreen'; import ChangeServerScreen from './containers/auth/ChangeServerScreen'; import SignupScreen from './containers/auth/SignupScreen'; import ImportScreen from './containers/auth/ImportScreen'; import SetupAssistentScreen from './containers/auth/SetupAssistantScreen'; import InviteScreen from './containers/auth/InviteScreen'; import AuthLayoutContainer from './containers/auth/AuthLayoutContainer'; import WorkspacesScreen from './features/workspaces/containers/WorkspacesScreen'; import EditWorkspaceScreen from './features/workspaces/containers/EditWorkspaceScreen'; import { WORKSPACES_ROUTES } from './features/workspaces/constants'; import { Actions } from './actions/lib/actions'; import { RealStores } from './stores'; type Props = { stores: RealStores; actions: Actions; history: any; }; class FerdiumRoutes extends Component { render(): ReactElement { const { history } = this.props; const routeProps = { stores: this.props.stores, actions: this.props.actions, }; const errorProps = { error: this.props.stores.globalError.error || {}, }; return ( }> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> }> } > } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> ); } } export default inject('stores', 'actions')(observer(FerdiumRoutes));