use user from session
This commit is contained in:
parent
5f47162a50
commit
700eaf3eb2
16 changed files with 148 additions and 107 deletions
8
src/app/femtoApp.ts
Normal file
8
src/app/femtoApp.ts
Normal file
|
@ -0,0 +1,8 @@
|
|||
import { FemtoApp } from '../types'
|
||||
import { produce } from 'immer'
|
||||
|
||||
export function setGlobal<K extends keyof FemtoApp>(k: K, v: FemtoApp[K]) {
|
||||
window.$femto = produce(window.$femto ?? {}, (draft) => {
|
||||
draft[k] = v
|
||||
})
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue