Skip to content

Commit 5fefc65

Browse files
committed
Wire shop UI to RPCs and auto-equip after purchase.
Refactor client storage to call Supabase RPCs and equip items immediately after a successful buy.
1 parent f02208c commit 5fefc65

3 files changed

Lines changed: 533 additions & 118 deletions

File tree

components/shop/shop-content.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,8 @@ export function ShopContent() {
147147

148148
try {
149149
const item = await purchaseShopItem(itemId);
150-
toast(`Purchased ${item.name}.`, "success");
150+
await equipShopItem(itemId);
151+
toast(`Purchased and equipped ${item.name}.`, "success");
151152
await refreshShop();
152153
} catch (purchaseError) {
153154
toast(

0 commit comments

Comments
 (0)