aboutsummaryrefslogtreecommitdiffstats
path: root/src/containers/settings/SettingsWindow.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/containers/settings/SettingsWindow.tsx')
-rw-r--r--src/containers/settings/SettingsWindow.tsx19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/containers/settings/SettingsWindow.tsx b/src/containers/settings/SettingsWindow.tsx
index 2192a6f69..93bb08c7c 100644
--- a/src/containers/settings/SettingsWindow.tsx
+++ b/src/containers/settings/SettingsWindow.tsx
@@ -1,23 +1,20 @@
1import { Component, ReactNode, ReactPortal } from 'react'; 1import { inject, observer } from 'mobx-react';
2import { Component, ReactPortal } from 'react';
2import ReactDOM from 'react-dom'; 3import ReactDOM from 'react-dom';
3import { observer, inject } from 'mobx-react'; 4import { Outlet } from 'react-router-dom';
4 5
5import { StoresProps } from '../../@types/ferdium-components.types'; 6import { StoresProps } from '../../@types/ferdium-components.types';
6import Layout from '../../components/settings/SettingsLayout';
7import Navigation from '../../components/settings/navigation/SettingsNavigation'; 7import Navigation from '../../components/settings/navigation/SettingsNavigation';
8import Layout from '../../components/settings/SettingsLayout';
8import ErrorBoundary from '../../components/util/ErrorBoundary'; 9import ErrorBoundary from '../../components/util/ErrorBoundary';
9import { workspaceStore } from '../../features/workspaces'; 10import { workspaceStore } from '../../features/workspaces';
10 11
11interface SettingsContainerProps extends StoresProps { 12class SettingsContainer extends Component<StoresProps> {
12 children: ReactNode;
13}
14
15class SettingsContainer extends Component<SettingsContainerProps> {
16 portalRoot: any; 13 portalRoot: any;
17 14
18 el: HTMLDivElement; 15 el: HTMLDivElement;
19 16
20 constructor(props: SettingsContainerProps) { 17 constructor(props: StoresProps) {
21 super(props); 18 super(props);
22 19
23 this.portalRoot = document.querySelector('#portalContainer'); 20 this.portalRoot = document.querySelector('#portalContainer');
@@ -33,7 +30,7 @@ class SettingsContainer extends Component<SettingsContainerProps> {
33 } 30 }
34 31
35 render(): ReactPortal { 32 render(): ReactPortal {
36 const { children, stores } = this.props; 33 const { stores } = this.props;
37 const { closeSettings } = this.props.actions.ui; 34 const { closeSettings } = this.props.actions.ui;
38 35
39 const navigation = ( 36 const navigation = (
@@ -46,7 +43,7 @@ class SettingsContainer extends Component<SettingsContainerProps> {
46 return ReactDOM.createPortal( 43 return ReactDOM.createPortal(
47 <ErrorBoundary> 44 <ErrorBoundary>
48 <Layout navigation={navigation} closeSettings={closeSettings}> 45 <Layout navigation={navigation} closeSettings={closeSettings}>
49 {children} 46 <Outlet />
50 </Layout> 47 </Layout>
51 </ErrorBoundary>, 48 </ErrorBoundary>,
52 this.el, 49 this.el,