aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/Main.tsx
diff options
context:
space:
mode:
authoryipstanley <stanley_yip@brown.edu>2019-07-14 20:46:20 -0400
committeryipstanley <stanley_yip@brown.edu>2019-07-14 20:46:20 -0400
commitc39114a07f1710205b512391de3a115a93883311 (patch)
tree49153465f4cbb8b70b3c583279d79bac6439f93d /src/client/views/Main.tsx
parentc4f324757c4ce3c9da077f5b10370f3b53cb3411 (diff)
parent66f0d72f07d3cf28e01abd0d9b2659c951defcd9 (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web
Diffstat (limited to 'src/client/views/Main.tsx')
-rw-r--r--src/client/views/Main.tsx5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/views/Main.tsx b/src/client/views/Main.tsx
index 589542806..80399e24b 100644
--- a/src/client/views/Main.tsx
+++ b/src/client/views/Main.tsx
@@ -6,6 +6,7 @@ import * as React from 'react';
import { Cast } from "../../new_fields/Types";
import { Doc, DocListCastAsync } from "../../new_fields/Doc";
import { List } from "../../new_fields/List";
+import { DocServer } from "../DocServer";
let swapDocs = async () => {
let oldDoc = await Cast(CurrentUserUtils.UserDocument.linkManagerDoc, Doc);
@@ -28,8 +29,10 @@ let swapDocs = async () => {
}
(async () => {
+ const info = await CurrentUserUtils.loadCurrentUser();
+ DocServer.init(window.location.protocol, window.location.hostname, 4321, info.email);
await Docs.Prototypes.initialize();
- await CurrentUserUtils.loadCurrentUser();
+ await CurrentUserUtils.loadUserDocument(info);
await swapDocs();
ReactDOM.render(<MainView />, document.getElementById('root'));
})(); \ No newline at end of file