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.
This commit is contained in:
@@ -147,7 +147,8 @@ export function ShopContent() {
|
||||
|
||||
try {
|
||||
const item = await purchaseShopItem(itemId);
|
||||
toast(`Purchased ${item.name}.`, "success");
|
||||
await equipShopItem(itemId);
|
||||
toast(`Purchased and equipped ${item.name}.`, "success");
|
||||
await refreshShop();
|
||||
} catch (purchaseError) {
|
||||
toast(
|
||||
|
||||
Reference in New Issue
Block a user