Improve shop UX, starting balance, and top bar branding.

Give new users 100 free points, allow shop previews regardless of balance, rename clothing items with descriptive labels, and show only the HaBit logo in the top-left.
This commit is contained in:
2026-05-24 04:51:01 -06:00
parent 69131ac8eb
commit 5dda46cb87
12 changed files with 286 additions and 49 deletions

View File

@@ -1,3 +1,4 @@
import { DEFAULT_STARTING_COINS } from "@/lib/coins";
import { createClient } from "@/lib/supabase/client";
async function getAuthenticatedUserId() {
@@ -35,13 +36,13 @@ export async function getCoins(): Promise<number> {
if (!data) {
const { error: insertError } = await supabase
.from("avatar_state")
.insert({ user_id: userId, coins: 0 });
.insert({ user_id: userId, coins: DEFAULT_STARTING_COINS });
if (insertError) {
throw new Error(insertError.message);
}
return 0;
return DEFAULT_STARTING_COINS;
}
return data.coins ?? 0;