brought both code in 1 repo, working on merging them!

This commit is contained in:
RezHackXYZ 2025-05-26 08:37:44 +05:30
parent d1c8ae269b
commit 9f927cf2e9
No known key found for this signature in database
82 changed files with 3220 additions and 20 deletions

View file

@ -0,0 +1,18 @@
import { supabase } from "$lib/supabase.js";
import { players } from "./HostsData.svelte.js";
export async function GetCurrentPlayers(gamePin) {
const { data, error } = await supabase
.from("players")
.select("playername")
.eq("gameid", Number(gamePin));
console.log("Current players data:", JSON.stringify(data));
if (error) {
console.error("Error fetching players:", error);
return;
}
players.v = data ? data.map(player => player.playername) : [];
}