use user from session

This commit is contained in:
john 2025-05-20 10:06:18 +02:00
parent 5f47162a50
commit 700eaf3eb2
16 changed files with 148 additions and 107 deletions

8
src/app/femtoApp.ts Normal file
View 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
})
}