diff options
Diffstat (limited to 'src/state/models/me.ts')
-rw-r--r-- | src/state/models/me.ts | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/state/models/me.ts b/src/state/models/me.ts index 3fd5db9ac..1ec418b78 100644 --- a/src/state/models/me.ts +++ b/src/state/models/me.ts @@ -14,18 +14,16 @@ export class MeModel { async load() { const sess = this.rootStore.session if (sess.isAuthed) { - const userDb = this.rootStore.api.mockDb.mainUser - this.did = userDb.did - this.name = userDb.name - const profile = await this.rootStore.api - .repo(this.did, true) - .collection('blueskyweb.xyz:Profiles') - .get('Profile', 'profile') - .catch(_ => undefined) + // TODO + this.did = 'did:test:alice' + this.name = 'alice.todo' + const profile = await this.rootStore.api.todo.social.getProfile({ + user: this.did, + }) runInAction(() => { - if (profile?.valid) { - this.displayName = profile.value.displayName - this.description = profile.value.description + if (profile?.data) { + this.displayName = profile.data.displayName + this.description = profile.data.description } else { this.displayName = '' this.description = '' |