Add contributing file, rename some files

This commit is contained in:
Jon Staab
2025-08-21 15:01:31 -07:00
parent d4943daa82
commit ba80ebac63
155 changed files with 438 additions and 349 deletions
@@ -1,6 +1,6 @@
<script lang="ts">
import {AuthStatus, SocketStatus} from "@welshman/net"
import {deriveSocket} from "@app/state"
import {deriveSocket} from "@app/core/state"
import StatusIndicator from "@lib/components/StatusIndicator.svelte"
type Props = {
+15
View File
@@ -0,0 +1,15 @@
// Use this for passing state between pages implicitly
const state = new Map<string, any>()
export const setKey = <T>(key: string, value: T) => state.set(key, value)
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)
// Goofy hack due to sveltekit's double-rendering
setTimeout(() => state.delete(key), 300)
return value
}