import { Component, ReactElement } from 'react'; import { inject, observer } from 'mobx-react'; import { Navigate, Route, Routes, unstable_HistoryRouter as HistoryRouter, } from 'react-router-dom'; import { HashHistory } from 'history'; import AppLayoutContainer from './containers/layout/AppLayoutContainer'; import SettingsWindow from './containers/settings/SettingsWindow'; import ReleaseNotesWindow from './containers/settings/ReleaseNotesWindow'; 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 ReleaseNotesScreen from './containers/settings/ReleaseNotesScreen'; import WelcomeScreen from './containers/auth/WelcomeScreen'; import LoginScreen from './containers/auth/LoginScreen'; import AuthReleaseNotesScreen from './containers/auth/AuthReleaseNotesScreen'; import PasswordScreen from './containers/auth/PasswordScreen'; import ChangeServerScreen from './containers/auth/ChangeServerScreen'; import SignupScreen from './containers/auth/SignupScreen'; import SetupAssistantScreen 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 { StoresProps } from './@types/ferdium-components.types'; import { Actions } from './actions/lib/actions'; import { RealStores } from './stores'; import DownloadManagerScreen from './containers/download-manager/DownloadManagerScreen'; import DownloadManagerWindow from './containers/download-manager/DownloadManagerWindow'; interface IProps { history: HashHistory; actions?: Actions; stores?: RealStores; } @inject('stores', 'actions') @observer class FerdiumRoutes extends Component { render(): ReactElement { const { history, stores, actions } = this.props; const routeProps: StoresProps = { stores: stores!, actions: actions! }; const errorProps = { error: routeProps.stores.globalError.error || {} }; return ( // @ts-expect-error Fix me }> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> }> } > } /> } > } /> } > } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> ); } } export default FerdiumRoutes;