From ac0dfd18950cb2b1e70e0df1c5fc7778e393007f Mon Sep 17 00:00:00 2001
From: Sam Wilkins <samwilkins333@gmail.com>
Date: Wed, 27 Feb 2019 13:06:51 -0500
Subject: now loads workspaces from ids

---
 src/server/authentication/controllers/WorkspacesMenu.tsx | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

(limited to 'src/server/authentication/controllers/WorkspacesMenu.tsx')

diff --git a/src/server/authentication/controllers/WorkspacesMenu.tsx b/src/server/authentication/controllers/WorkspacesMenu.tsx
index b1125384e..8edd63fba 100644
--- a/src/server/authentication/controllers/WorkspacesMenu.tsx
+++ b/src/server/authentication/controllers/WorkspacesMenu.tsx
@@ -5,13 +5,17 @@ import { observer } from "mobx-react";
 import * as request from 'request'
 import './WorkspacesMenu.css'
 
+export interface WorkspaceMenuProps {
+    load: (workspaceId: string) => void;
+}
+
 @observer
-export class WorkspacesMenu extends React.Component {
+export class WorkspacesMenu extends React.Component<WorkspaceMenuProps> {
     static Instance: WorkspacesMenu;
     @observable private workspacesExposed: boolean = false;
     @observable private workspaceIds: Array<string> = [];
 
-    constructor(props: Readonly<{}>) {
+    constructor(props: WorkspaceMenuProps) {
         super(props);
         WorkspacesMenu.Instance = this;
     }
@@ -39,8 +43,7 @@ export class WorkspacesMenu extends React.Component {
     }
 
     setWorkspaceId = (e: React.MouseEvent) => {
-        //Main.load(e.currentTarget.innherHTML)
-        console.log(e.currentTarget.innerHTML);
+        this.props.load(e.currentTarget.innerHTML);
     }
 
     render() {
-- 
cgit v1.2.3-70-g09d2

