diff options
author | Balaji Vijayakumar <kuttibalaji.v6@gmail.com> | 2022-10-31 16:14:30 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-31 10:44:30 +0000 |
commit | 87bc593ac72af503171f759fc6e4b1e9e0813039 (patch) | |
tree | 7128adb5cc48ae36104c4d3e6de219b9de1ac446 /src/containers | |
parent | Convert web controls & screen to typescript (#722) (diff) | |
download | ferdium-app-87bc593ac72af503171f759fc6e4b1e9e0813039.tar.gz ferdium-app-87bc593ac72af503171f759fc6e4b1e9e0813039.tar.zst ferdium-app-87bc593ac72af503171f759fc6e4b1e9e0813039.zip |
refactor: convert global app to typescript (#723)
Diffstat (limited to 'src/containers')
-rw-r--r-- | src/containers/layout/AppLayoutContainer.tsx | 4 | ||||
-rw-r--r-- | src/containers/settings/ReleaseNotesWindow.tsx | 15 |
2 files changed, 15 insertions, 4 deletions
diff --git a/src/containers/layout/AppLayoutContainer.tsx b/src/containers/layout/AppLayoutContainer.tsx index a5fea52cd..0864fa027 100644 --- a/src/containers/layout/AppLayoutContainer.tsx +++ b/src/containers/layout/AppLayoutContainer.tsx | |||
@@ -13,6 +13,8 @@ import { workspaceStore } from '../../features/workspaces'; | |||
13 | 13 | ||
14 | interface AppLayoutContainerProps extends StoresProps {} | 14 | interface AppLayoutContainerProps extends StoresProps {} |
15 | 15 | ||
16 | @inject('stores', 'actions') | ||
17 | @observer | ||
16 | class AppLayoutContainer extends Component<AppLayoutContainerProps> { | 18 | class AppLayoutContainer extends Component<AppLayoutContainerProps> { |
17 | render(): ReactElement { | 19 | render(): ReactElement { |
18 | const { app, features, services, ui, settings, requests, user, router } = | 20 | const { app, features, services, ui, settings, requests, user, router } = |
@@ -155,4 +157,4 @@ class AppLayoutContainer extends Component<AppLayoutContainerProps> { | |||
155 | } | 157 | } |
156 | } | 158 | } |
157 | 159 | ||
158 | export default inject('stores', 'actions')(observer(AppLayoutContainer)); | 160 | export default AppLayoutContainer; |
diff --git a/src/containers/settings/ReleaseNotesWindow.tsx b/src/containers/settings/ReleaseNotesWindow.tsx index 3e43727d0..ea7b952d2 100644 --- a/src/containers/settings/ReleaseNotesWindow.tsx +++ b/src/containers/settings/ReleaseNotesWindow.tsx | |||
@@ -6,8 +6,17 @@ import { Outlet } from 'react-router-dom'; | |||
6 | import { StoresProps } from '../../@types/ferdium-components.types'; | 6 | import { StoresProps } from '../../@types/ferdium-components.types'; |
7 | import Layout from '../../components/settings/releaseNotes/ReleaseNotesLayout'; | 7 | import Layout from '../../components/settings/releaseNotes/ReleaseNotesLayout'; |
8 | import ErrorBoundary from '../../components/util/ErrorBoundary'; | 8 | import ErrorBoundary from '../../components/util/ErrorBoundary'; |
9 | import { Actions } from '../../actions/lib/actions'; | ||
10 | import { RealStores } from '../../stores'; | ||
9 | 11 | ||
10 | class SettingsContainer extends Component<StoresProps> { | 12 | interface IProps { |
13 | actions?: Actions; | ||
14 | stores?: RealStores; | ||
15 | } | ||
16 | |||
17 | @inject('stores', 'actions') | ||
18 | @observer | ||
19 | class SettingsContainer extends Component<IProps> { | ||
11 | portalRoot: any; | 20 | portalRoot: any; |
12 | 21 | ||
13 | el: HTMLDivElement; | 22 | el: HTMLDivElement; |
@@ -30,7 +39,7 @@ class SettingsContainer extends Component<StoresProps> { | |||
30 | render(): ReactPortal { | 39 | render(): ReactPortal { |
31 | return ReactDOM.createPortal( | 40 | return ReactDOM.createPortal( |
32 | <ErrorBoundary> | 41 | <ErrorBoundary> |
33 | <Layout {...this.props}> | 42 | <Layout> |
34 | <Outlet /> | 43 | <Outlet /> |
35 | </Layout> | 44 | </Layout> |
36 | </ErrorBoundary>, | 45 | </ErrorBoundary>, |
@@ -39,4 +48,4 @@ class SettingsContainer extends Component<StoresProps> { | |||
39 | } | 48 | } |
40 | } | 49 | } |
41 | 50 | ||
42 | export default inject('stores', 'actions')(observer(SettingsContainer)); | 51 | export default SettingsContainer; |