vibe coded v1

This commit is contained in:
khannurien
2026-03-16 07:34:49 +00:00
parent 6207a7549f
commit e88fed4e98
48 changed files with 4303 additions and 595 deletions

22
src/contexts/WSContext.ts Normal file
View File

@@ -0,0 +1,22 @@
import { createContext } from "react";
import type { Dump, OnlineUser } from "../model.ts";
export interface WSContextValue {
onlineUsers: OnlineUser[];
voteCounts: Record<string, number>;
myVotes: Set<string>;
recentDumps: Dump[];
deletedDumpIds: Set<string>;
castVote: (dumpId: string) => void;
removeVote: (dumpId: string) => void;
}
export const WSContext = createContext<WSContextValue>({
onlineUsers: [],
voteCounts: {},
myVotes: new Set(),
recentDumps: [],
deletedDumpIds: new Set(),
castVote: () => {},
removeVote: () => {},
});