diff --git a/app/components/MainSlideover.tsx b/app/components/MainSlideover.tsx index bc3a20e..85036c1 100644 --- a/app/components/MainSlideover.tsx +++ b/app/components/MainSlideover.tsx @@ -1363,14 +1363,15 @@ const MainSlideover = memo(function MainSlideover({
-
+
Sell blocks or shop in the Store
@@ -2123,7 +2124,7 @@ const MainSlideover = memo(function MainSlideover({ return (
{ if (onSelectBlockType) { onSelectBlockType(type); @@ -2131,20 +2132,22 @@ const MainSlideover = memo(function MainSlideover({ } }} > -
- {blockType.name} - +
+
+ {blockType.name} +
+ {count}
-
+
{blockType.name}
-
+
Click to place
); @@ -2170,36 +2173,38 @@ const MainSlideover = memo(function MainSlideover({ {activeTab === "store" && (
-
+
-

+

Coin Balance

-
- - +
+
+ +
+ {coinBalance.toLocaleString()}
-
- Transaction-based balance -

- Credits add coins, debits spend them +

+ Transaction-based +

+ Credits add, debits spend

-
+
-

+

Buy Blocks

-
- - Supporter blocks require an active badge +
+ + Supporter blocks require badge
@@ -2207,29 +2212,30 @@ const MainSlideover = memo(function MainSlideover({ {storeBlocks.map((block) => { const cost = getBlockPurchaseCost(block); const locked = block.supporterOnly && !profile?.supporter; + const canAfford = coinBalance >= cost; return (
-
-

+

+

{block.name}

-

+

{block.category}

{block.supporterOnly && ( - + Supporter )}
-
+
{block.name}
-
-
- - {cost} +
+
+ + {cost}
- + {block.rarity}
@@ -2252,17 +2258,25 @@ const MainSlideover = memo(function MainSlideover({ disabled={ purchasingBlockType === block.id || locked || - coinBalance < cost + !canAfford } - className="text-xs font-semibold uppercase rounded-md px-2 py-1 bg-green-600 text-white hover:bg-green-700 disabled:opacity-50 disabled:cursor-not-allowed" + className={`text-xs font-bold uppercase rounded-lg px-3 py-2 transition-all ${ + locked + ? "bg-neutral-200 dark:bg-neutral-700 text-neutral-500 dark:text-neutral-400 cursor-not-allowed" + : !canAfford + ? "bg-amber-100 dark:bg-amber-900/40 text-amber-700 dark:text-amber-300 cursor-not-allowed" + : purchasingBlockType === block.id + ? "bg-green-500 text-white cursor-wait" + : "bg-gradient-to-r from-green-600 to-green-700 text-white hover:from-green-700 hover:to-green-800 shadow-sm hover:shadow-md" + } disabled:opacity-60 disabled:cursor-not-allowed`} > {locked ? "Supporter Only" : purchasingBlockType === block.id ? "Purchasing..." - : coinBalance < cost + : !canAfford ? "Need Coins" - : "Buy"} + : "Buy Now"}
); @@ -2270,38 +2284,50 @@ const MainSlideover = memo(function MainSlideover({
-
-
- -

- Transactions +
+
+
+ +
+

+ Transaction History

{sortedTransactions.length === 0 ? ( -

- No transactions yet. Sell a block or make a purchase to get started. -

+
+
+ +
+

+ No transactions yet +

+

+ Sell a block or make a purchase to get started +

+
) : ( -
+
{sortedTransactions.slice(0, 12).map((transaction) => { const isCredit = transaction.amount >= 0; return (
-
- +
+ {transaction.reason || "Transaction"} - + {new Date(transaction.createdAt).toLocaleString()}
{isCredit ? "+" : ""}