Rework profile page to include working view selector
This commit is contained in:
parent
2ec09ba545
commit
bb06ef4f6e
19 changed files with 569 additions and 94 deletions
49
src/state/models/badges-view.ts
Normal file
49
src/state/models/badges-view.ts
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
import {makeAutoObservable} from 'mobx'
|
||||
import {RootStoreModel} from './root-store'
|
||||
|
||||
// TODO / DEBUG
|
||||
// this is a temporary fake for the model until the view actually gets implemented in the bsky api
|
||||
// -prf
|
||||
|
||||
export class BadgesViewModel {
|
||||
// state
|
||||
isLoading = false
|
||||
isRefreshing = false
|
||||
hasLoaded = false
|
||||
error = ''
|
||||
|
||||
constructor(public rootStore: RootStoreModel) {
|
||||
makeAutoObservable(
|
||||
this,
|
||||
{
|
||||
rootStore: false,
|
||||
},
|
||||
{autoBind: true},
|
||||
)
|
||||
}
|
||||
|
||||
get hasContent() {
|
||||
return false
|
||||
}
|
||||
|
||||
get hasError() {
|
||||
return this.error !== ''
|
||||
}
|
||||
|
||||
get isEmpty() {
|
||||
return this.hasLoaded && !this.hasContent
|
||||
}
|
||||
|
||||
// public api
|
||||
// =
|
||||
|
||||
async setup() {
|
||||
this.hasLoaded = true
|
||||
}
|
||||
|
||||
async refresh() {}
|
||||
|
||||
async loadMore() {}
|
||||
|
||||
async update() {}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue