blob: 675feb8bcd80cc28847f434c9eb00116694f08ff (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
import {Instance, SnapshotOut, types} from 'mobx-state-tree'
export const SessionModel = types
.model('Session')
.props({
isAuthed: types.boolean,
})
.actions(self => ({
setAuthed: (v: boolean) => {
self.isAuthed = v
},
}))
export interface Session extends Instance<typeof SessionModel> {}
export interface SessionSnapshot extends SnapshotOut<typeof SessionModel> {}
export function createDefaultSession() {
return {
isAuthed: false,
}
}
|