From 137555821f172e4eadc7cf099d4270ae8fc1374e Mon Sep 17 00:00:00 2001
From: Markus Hatvan <markus_hatvan@aon.at>
Date: Thu, 14 Oct 2021 23:32:05 +0200
Subject: chore: convert components to tsx (#2071)

---
 .../workspaces/containers/WorkspacesScreen.tsx     | 41 ++++++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 src/features/workspaces/containers/WorkspacesScreen.tsx

(limited to 'src/features/workspaces/containers/WorkspacesScreen.tsx')

diff --git a/src/features/workspaces/containers/WorkspacesScreen.tsx b/src/features/workspaces/containers/WorkspacesScreen.tsx
new file mode 100644
index 000000000..a07e92439
--- /dev/null
+++ b/src/features/workspaces/containers/WorkspacesScreen.tsx
@@ -0,0 +1,41 @@
+import { Component } from 'react';
+import { inject, observer } from 'mobx-react';
+import WorkspacesDashboard from '../components/WorkspacesDashboard';
+import ErrorBoundary from '../../../components/util/ErrorBoundary';
+import { workspaceStore } from '../index';
+import {
+  createWorkspaceRequest,
+  deleteWorkspaceRequest,
+  getUserWorkspacesRequest,
+  updateWorkspaceRequest,
+} from '../api';
+import { WorkspacesStore } from '../../../stores.types';
+
+type Props = {
+  actions: {
+    workspaces: WorkspacesStore;
+  };
+};
+
+@inject('stores', 'actions')
+@observer
+class WorkspacesScreen extends Component<Props> {
+  render() {
+    const { actions } = this.props;
+    return (
+      <ErrorBoundary>
+        <WorkspacesDashboard
+          workspaces={workspaceStore.workspaces}
+          getUserWorkspacesRequest={getUserWorkspacesRequest}
+          createWorkspaceRequest={createWorkspaceRequest}
+          deleteWorkspaceRequest={deleteWorkspaceRequest}
+          updateWorkspaceRequest={updateWorkspaceRequest}
+          onCreateWorkspaceSubmit={data => actions.workspaces.create(data)}
+          onWorkspaceClick={w => actions.workspaces.edit({ workspace: w })}
+        />
+      </ErrorBoundary>
+    );
+  }
+}
+
+export default WorkspacesScreen;
-- 
cgit v1.2.3-54-g00ecf

