From 9f91edc1d1dce322c87eac20b6dd060bc9ccbcfb Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Wed, 28 Sep 2022 15:03:02 -0500 Subject: [PATCH] Fix to session load --- src/state/models/me.ts | 6 +++--- src/view/shell/mobile/index.tsx | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/state/models/me.ts b/src/state/models/me.ts index fb5445cb..17a37238 100644 --- a/src/state/models/me.ts +++ b/src/state/models/me.ts @@ -13,9 +13,9 @@ export class MeModel { async load() { const sess = this.rootStore.session - if (sess.isAuthed) { - this.did = sess.userdid || '' - this.name = sess.username + if (sess.isAuthed && sess.data) { + this.did = sess.data.userdid || '' + this.name = sess.data.username const profile = await this.rootStore.api.todo.social.getProfile({ user: this.did, }) diff --git a/src/view/shell/mobile/index.tsx b/src/view/shell/mobile/index.tsx index 25ee30e3..837bc6b5 100644 --- a/src/view/shell/mobile/index.tsx +++ b/src/view/shell/mobile/index.tsx @@ -167,7 +167,6 @@ export const MobileShell: React.FC = observer(() => { opacity: interpolate(swipeGestureInterp.value, [0, 1.0], [0.6, 0.0]), })) - console.log('authed?', store.session.isAuthed) if (!store.session.isAuthed) { return (