diff options
author | Paul Frazee <pfrazee@gmail.com> | 2022-11-04 17:39:54 -0500 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2022-11-04 17:39:54 -0500 |
commit | f333a90fab79d582bbb7f9114f0b005fdb1cae8b (patch) | |
tree | 631755be2dd6976e9d0efd90f33751c52a09ef37 /src/state/models/profile-ui.ts | |
parent | 8ae6e67eea8890f639dbaa9423e99cad5e28502f (diff) | |
download | voidsky-f333a90fab79d582bbb7f9114f0b005fdb1cae8b.tar.zst |
Update to the latest APIs
Diffstat (limited to 'src/state/models/profile-ui.ts')
-rw-r--r-- | src/state/models/profile-ui.ts | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/state/models/profile-ui.ts b/src/state/models/profile-ui.ts index cd29c35d2..830dc22b1 100644 --- a/src/state/models/profile-ui.ts +++ b/src/state/models/profile-ui.ts @@ -2,7 +2,6 @@ import {makeAutoObservable} from 'mobx' import {RootStoreModel} from './root-store' import {ProfileViewModel} from './profile-view' import {FeedModel} from './feed-view' -import {BadgesViewModel} from './badges-view' export const SECTION_IDS = { POSTS: 0, @@ -20,7 +19,6 @@ export class ProfileUiModel { // data profile: ProfileViewModel feed: FeedModel - badges: BadgesViewModel // ui state selectedViewIndex = 0 @@ -42,16 +40,12 @@ export class ProfileUiModel { author: params.user, limit: 10, }) - this.badges = new BadgesViewModel(rootStore) } - get currentView(): FeedModel | BadgesViewModel { + get currentView(): FeedModel { if (this.selectedViewIndex === SECTION_IDS.POSTS) { return this.feed } - if (this.selectedViewIndex === SECTION_IDS.BADGES) { - return this.badges - } throw new Error(`Invalid selector value: ${this.selectedViewIndex}`) } @@ -79,9 +73,6 @@ export class ProfileUiModel { this.feed .setup() .catch(err => console.error('Failed to fetch feed', err)), - this.badges - .setup() - .catch(err => console.error('Failed to fetch badges', err)), ]) } |