client side state for activeMembership and fetch notes based on same

This commit is contained in:
Michael Dausmann
2023-02-13 23:51:52 +11:00
parent 90a1e4ef65
commit bb9f4dfd1d
8 changed files with 63 additions and 15 deletions

10
composables/states.ts Normal file
View File

@@ -0,0 +1,10 @@
import { Membership, Note } from ".prisma/client"
export type AppState = {
activeMembership?: Membership
notes: Note[]
}
export const appState = () => useState<AppState>('appState', () => ({
notes: []
}));