Skip to content

Commit

Permalink
fix: Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mradigen committed Apr 12, 2024
1 parent 08c0c7e commit aa3a64c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
21 changes: 10 additions & 11 deletions src/lib/components/Onboard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,16 @@
let team_id = formData.get('team_id') || null;
const { data, error } = await supabase
.from('users')
.insert([
{
id: $auth_user.id,
name: formData.get('name') as string,
reg_no: (formData.get('reg_no') as string).toLowerCase(),
team: team_id
}
])
.select();
// const { error } = await supabase.from('users').insert([
// {
// id: $auth_user.id,
// name: formData.get('name') as string,
// reg_no: (formData.get('reg_no') as string).toLowerCase(),
// team: team_id
// }
// ]);
//
// if (error) return console.error(error);
if (create) {
const { data, error } = await supabase
Expand Down
14 changes: 7 additions & 7 deletions src/routes/leaderboard/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
async function loadTeams() {
// loading = true;
const { data, error } = await supabase.from('teams').select('name, points');
const { data, error } = await supabase.from('leaderboard').select('name, points');
if (error) console.log(error);
if (data.length) leaderboard = data;
loading = false;
Expand All @@ -30,6 +30,7 @@
}
onMount(async () => {
console.log(await supabase.rpc('update_leaderboard'));
loadTeams();
resize();
});
Expand Down Expand Up @@ -64,13 +65,12 @@

<svelte:window on:resize={resize} />

<img
src="{base}/assets/Asset 2.png"
class="gradient absolute left-1/2 top-1/2 -z-10 hidden h-screen translate-x-[-50%] translate-y-[-50%] md:block"
alt="Gradient"
/>

<Loading {loading}>
<img
src="{base}/assets/Asset 2.png"
class="gradient absolute left-1/2 top-1/2 -z-10 hidden h-screen translate-x-[-50%] translate-y-[-50%] md:block"
alt="Gradient"
/>
<Section>
<div class="m-auto max-w-3xl space-y-8">
<div class="flex flex-col space-y-4 md:flex-row md:space-x-4 md:space-y-0">
Expand Down

0 comments on commit aa3a64c

Please sign in to comment.