Replace state when opening a modal from a drawer

This commit is contained in:
Jon Staab
2024-10-24 14:18:32 -07:00
parent ceb7f3340d
commit 058f1d09d2
4 changed files with 99 additions and 87 deletions
+2 -1
View File
@@ -8,7 +8,8 @@ export const getKey = <T>(key: string) => state.get(key) as T | undefined
export const popKey = <T>(key: string) => {
const value: T | undefined = state.get(key)
state.delete(key)
// Goofy hack due to sveltekit's double-rendering
setTimeout(() => state.delete(key), 300)
return value
}