rubgram public side

Co-authored-by: Gunshin <[email protected]>
This commit is contained in:
Dreamgineer
2025-11-27 12:12:21 -05:00
co-authored by Gunshin
Unverified
parent 45f6d06cc9
commit 8a96ea8573
44 changed files with 2140 additions and 412 deletions
+9 -1
View File
@@ -14,6 +14,7 @@ type WebsiteComms = Partial<{
debug: boolean;
connected: boolean;
updated: boolean;
"rubgram.services": ("abyss" | "theater" | "stygian")[];
_raw: Record<string, unknown>;
}>;
@@ -91,7 +92,14 @@ export default function CommsProvider({
}
export const comms = {
var(name: keyof WebsiteComms) {
var<K extends keyof WebsiteComms>(
name: K,
): [
WebsiteComms[K],
(
value: WebsiteComms[K] | ((prev: WebsiteComms[K]) => WebsiteComms[K]),
) => void,
] {
const comms = use(CommsContext);
if (!comms.active) {
console.warn("ICC used outside of provider. Using local state instead.");