diff options
author | 2022-11-17 05:45:39 +0530 | |
---|---|---|
committer | 2022-11-17 00:15:39 +0000 | |
commit | d9502c7516bc2d4ae467c6ea8a2e4816b0885f37 (patch) | |
tree | b339c587a5529ac26d52cfc12d9972a8a00255e6 /src/features/workspaces/components/WorkspaceDrawer.tsx | |
parent | Transform JSX components to TSX (#755) (diff) | |
download | ferdium-app-d9502c7516bc2d4ae467c6ea8a2e4816b0885f37.tar.gz ferdium-app-d9502c7516bc2d4ae467c6ea8a2e4816b0885f37.tar.zst ferdium-app-d9502c7516bc2d4ae467c6ea8a2e4816b0885f37.zip |
Transfrom workspace components to ts (#775)
Diffstat (limited to 'src/features/workspaces/components/WorkspaceDrawer.tsx')
-rw-r--r-- | src/features/workspaces/components/WorkspaceDrawer.tsx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/features/workspaces/components/WorkspaceDrawer.tsx b/src/features/workspaces/components/WorkspaceDrawer.tsx index bdbebdb0a..61284d81a 100644 --- a/src/features/workspaces/components/WorkspaceDrawer.tsx +++ b/src/features/workspaces/components/WorkspaceDrawer.tsx | |||
@@ -11,7 +11,6 @@ import WorkspaceDrawerItem from './WorkspaceDrawerItem'; | |||
11 | import workspaceActions from '../actions'; | 11 | import workspaceActions from '../actions'; |
12 | import { workspaceStore } from '../index'; | 12 | import { workspaceStore } from '../index'; |
13 | import { getUserWorkspacesRequest } from '../api'; | 13 | import { getUserWorkspacesRequest } from '../api'; |
14 | import Service from '../../../models/Service'; | ||
15 | import Workspace from '../models/Workspace'; | 14 | import Workspace from '../models/Workspace'; |
16 | 15 | ||
17 | const messages = defineMessages({ | 16 | const messages = defineMessages({ |
@@ -90,7 +89,7 @@ const styles = theme => ({ | |||
90 | }); | 89 | }); |
91 | 90 | ||
92 | interface IProps extends WithStylesProps<typeof styles>, WrappedComponentProps { | 91 | interface IProps extends WithStylesProps<typeof styles>, WrappedComponentProps { |
93 | getServicesForWorkspace: (workspace: Workspace | null) => Service[]; | 92 | getServicesForWorkspace: (workspace: Workspace | null) => string[]; |
94 | } | 93 | } |
95 | 94 | ||
96 | @observer | 95 | @observer |
@@ -150,7 +149,9 @@ class WorkspaceDrawer extends Component<IProps> { | |||
150 | name={workspace.name} | 149 | name={workspace.name} |
151 | isActive={actualWorkspace === workspace} | 150 | isActive={actualWorkspace === workspace} |
152 | onClick={() => { | 151 | onClick={() => { |
153 | if (actualWorkspace === workspace) return; | 152 | if (actualWorkspace === workspace) { |
153 | return; | ||
154 | } | ||
154 | workspaceActions.activate({ workspace }); | 155 | workspaceActions.activate({ workspace }); |
155 | workspaceActions.toggleWorkspaceDrawer(); | 156 | workspaceActions.toggleWorkspaceDrawer(); |
156 | }} | 157 | }} |