Market: Techy angular mobile design matching Radar
Some checks failed
CI / Frontend Lint & Type Check (push) Has been cancelled
CI / Frontend Build (push) Has been cancelled
CI / Backend Lint (push) Has been cancelled
CI / Backend Tests (push) Has been cancelled
CI / Docker Build (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
Deploy / Build & Push Images (push) Has been cancelled
Deploy / Deploy to Server (push) Has been cancelled
Deploy / Notify (push) Has been cancelled
Some checks failed
CI / Frontend Lint & Type Check (push) Has been cancelled
CI / Frontend Build (push) Has been cancelled
CI / Backend Lint (push) Has been cancelled
CI / Backend Tests (push) Has been cancelled
CI / Docker Build (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
Deploy / Build & Push Images (push) Has been cancelled
Deploy / Deploy to Server (push) Has been cancelled
Deploy / Notify (push) Has been cancelled
This commit is contained in:
@ -30,7 +30,8 @@ import {
|
||||
Crown,
|
||||
Sparkles,
|
||||
Coins,
|
||||
Tag
|
||||
Tag,
|
||||
Filter
|
||||
} from 'lucide-react'
|
||||
import clsx from 'clsx'
|
||||
import Link from 'next/link'
|
||||
@ -111,7 +112,7 @@ function isSpam(domain: string): boolean {
|
||||
// ============================================================================
|
||||
|
||||
export default function MarketPage() {
|
||||
const { subscription, user, logout } = useStore()
|
||||
const { subscription, user, logout, checkAuth } = useStore()
|
||||
const { toast, showToast, hideToast } = useToast()
|
||||
|
||||
const [items, setItems] = useState<MarketItem[]>([])
|
||||
@ -134,8 +135,14 @@ export default function MarketPage() {
|
||||
const [totalPages, setTotalPages] = useState(1)
|
||||
const ITEMS_PER_PAGE = 50
|
||||
|
||||
// Mobile Menu
|
||||
// Mobile Menu & Filters
|
||||
const [menuOpen, setMenuOpen] = useState(false)
|
||||
const [filtersOpen, setFiltersOpen] = useState(false)
|
||||
|
||||
// Check auth on mount
|
||||
useEffect(() => {
|
||||
checkAuth()
|
||||
}, [checkAuth])
|
||||
|
||||
const loadData = useCallback(async (currentPage = 1) => {
|
||||
setLoading(true)
|
||||
@ -250,6 +257,14 @@ export default function MarketPage() {
|
||||
return filtered
|
||||
}, [items, searchQuery, loading, hideSpam])
|
||||
|
||||
// Active filters count
|
||||
const activeFiltersCount = [
|
||||
sourceFilter !== 'all',
|
||||
priceRange !== 'all',
|
||||
tldFilter !== 'all',
|
||||
hideSpam
|
||||
].filter(Boolean).length
|
||||
|
||||
// Mobile Nav
|
||||
const mobileNavItems = [
|
||||
{ href: '/terminal/radar', label: 'Radar', icon: Target, active: false },
|
||||
@ -300,50 +315,63 @@ export default function MarketPage() {
|
||||
{/* MOBILE HEADER */}
|
||||
{/* ═══════════════════════════════════════════════════════════════════════ */}
|
||||
<header
|
||||
className="lg:hidden sticky top-0 z-40 bg-[#020202]/80 backdrop-blur-xl border-b border-white/[0.06]"
|
||||
className="lg:hidden sticky top-0 z-40 bg-[#020202]/95 backdrop-blur-md border-b border-white/[0.08]"
|
||||
style={{ paddingTop: 'env(safe-area-inset-top)' }}
|
||||
>
|
||||
<div className="px-4 py-3 flex items-center justify-between">
|
||||
<div className="flex items-center gap-3">
|
||||
<div className="relative">
|
||||
<div className="w-9 h-9 bg-blue-500/10 border border-blue-500/20 rounded-xl flex items-center justify-center">
|
||||
<Gavel className="w-4 h-4 text-blue-400" />
|
||||
</div>
|
||||
<div className="px-4 py-3">
|
||||
{/* Top Row */}
|
||||
<div className="flex items-center justify-between mb-3">
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="w-1.5 h-1.5 bg-blue-400 animate-pulse" />
|
||||
<span className="text-[10px] font-mono tracking-[0.2em] text-blue-400 uppercase">Live Market</span>
|
||||
</div>
|
||||
<div>
|
||||
<h1 className="text-base font-bold text-white tracking-tight leading-none">Market</h1>
|
||||
<p className="text-[10px] text-white/40 font-medium tracking-wide mt-0.5">Live Auctions</p>
|
||||
<div className="flex items-center gap-2">
|
||||
<button
|
||||
onClick={handleRefresh}
|
||||
disabled={refreshing}
|
||||
className="w-8 h-8 flex items-center justify-center border border-white/[0.08] text-white/40"
|
||||
>
|
||||
<RefreshCw className={clsx("w-4 h-4", refreshing && "animate-spin")} />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="px-2.5 py-1 bg-white/[0.03] border border-white/[0.08] rounded-lg">
|
||||
<div className="text-xs font-bold text-white tabular-nums">{stats.total}</div>
|
||||
{/* Stats Grid */}
|
||||
<div className="grid grid-cols-4 gap-2">
|
||||
<div className="bg-white/[0.02] border border-white/[0.08] p-2">
|
||||
<div className="text-lg font-bold text-white tabular-nums">{stats.total}</div>
|
||||
<div className="text-[9px] font-mono text-white/30 uppercase tracking-wider">Total</div>
|
||||
</div>
|
||||
<div className="bg-accent/[0.05] border border-accent/20 p-2">
|
||||
<div className="text-lg font-bold text-accent tabular-nums">{stats.pounceCount}</div>
|
||||
<div className="text-[9px] font-mono text-accent/60 uppercase tracking-wider">Pounce</div>
|
||||
</div>
|
||||
<div className="bg-white/[0.02] border border-white/[0.08] p-2">
|
||||
<div className="text-lg font-bold text-white tabular-nums">{stats.auctionCount}</div>
|
||||
<div className="text-[9px] font-mono text-white/30 uppercase tracking-wider">External</div>
|
||||
</div>
|
||||
<div className="bg-amber-500/[0.05] border border-amber-500/20 p-2">
|
||||
<div className="text-lg font-bold text-amber-400 tabular-nums">{stats.highScore}</div>
|
||||
<div className="text-[9px] font-mono text-amber-400/60 uppercase tracking-wider">Score 80+</div>
|
||||
</div>
|
||||
<button
|
||||
onClick={handleRefresh}
|
||||
disabled={refreshing}
|
||||
className="w-9 h-9 flex items-center justify-center bg-white/[0.03] border border-white/[0.08] rounded-lg"
|
||||
>
|
||||
<RefreshCw className={clsx("w-4 h-4 text-white/50", refreshing && "animate-spin")} />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{/* ═══════════════════════════════════════════════════════════════════════ */}
|
||||
{/* SEARCH - Mobile */}
|
||||
{/* MOBILE SEARCH & FILTERS */}
|
||||
{/* ═══════════════════════════════════════════════════════════════════════ */}
|
||||
<section className="lg:hidden px-4 pt-4 pb-2">
|
||||
<section className="lg:hidden px-4 py-3 border-b border-white/[0.08]">
|
||||
{/* Search */}
|
||||
<div className={clsx(
|
||||
"relative border transition-all duration-300 rounded-xl overflow-hidden",
|
||||
"relative border-2 transition-all duration-200 mb-3",
|
||||
searchFocused
|
||||
? "border-blue-500/50 bg-blue-500/[0.03]"
|
||||
: "border-white/[0.08] bg-white/[0.03]"
|
||||
? "border-blue-400/50 bg-blue-400/[0.02]"
|
||||
: "border-white/[0.08] bg-white/[0.02]"
|
||||
)}>
|
||||
<div className="flex items-center">
|
||||
<Search className={clsx(
|
||||
"w-5 h-5 ml-4 transition-colors",
|
||||
"w-4 h-4 ml-3 transition-colors",
|
||||
searchFocused ? "text-blue-400" : "text-white/30"
|
||||
)} />
|
||||
<input
|
||||
@ -352,86 +380,135 @@ export default function MarketPage() {
|
||||
onChange={(e) => setSearchQuery(e.target.value)}
|
||||
onFocus={() => setSearchFocused(true)}
|
||||
onBlur={() => setSearchFocused(false)}
|
||||
placeholder="Search auctions..."
|
||||
className="flex-1 bg-transparent px-3 py-3.5 text-base text-white placeholder:text-white/20 outline-none font-medium"
|
||||
placeholder="Search domains..."
|
||||
className="flex-1 bg-transparent px-3 py-3 text-sm text-white placeholder:text-white/20 outline-none font-mono"
|
||||
/>
|
||||
{searchQuery && (
|
||||
<button
|
||||
onClick={() => setSearchQuery('')}
|
||||
className="p-3.5 text-white/30 active:text-white transition-colors"
|
||||
className="p-3 text-white/30 active:text-white transition-colors"
|
||||
>
|
||||
<X className="w-5 h-5" />
|
||||
<X className="w-4 h-4" />
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* ═══════════════════════════════════════════════════════════════════════ */}
|
||||
{/* FILTERS - Mobile Horizontal Scroll */}
|
||||
{/* ═══════════════════════════════════════════════════════════════════════ */}
|
||||
<section className="lg:hidden px-4 pb-4">
|
||||
<div className="flex gap-2 overflow-x-auto pb-2 scrollbar-hide">
|
||||
<button
|
||||
onClick={() => setSourceFilter(s => s === 'pounce' ? 'all' : 'pounce')}
|
||||
className={clsx(
|
||||
"flex items-center gap-1.5 px-3 py-2 rounded-full text-xs font-medium whitespace-nowrap transition-all",
|
||||
sourceFilter === 'pounce'
|
||||
? "bg-accent/20 text-accent border border-accent/30"
|
||||
: "bg-white/[0.03] text-white/50 border border-white/[0.08]"
|
||||
{/* Filter Toggle */}
|
||||
<button
|
||||
onClick={() => setFiltersOpen(!filtersOpen)}
|
||||
className={clsx(
|
||||
"flex items-center justify-between w-full py-2 px-3 border transition-colors",
|
||||
filtersOpen ? "border-blue-400/30 bg-blue-400/[0.05]" : "border-white/[0.08] bg-white/[0.02]"
|
||||
)}
|
||||
>
|
||||
<div className="flex items-center gap-2">
|
||||
<Filter className="w-4 h-4 text-white/40" />
|
||||
<span className="text-xs font-mono text-white/60">Filters</span>
|
||||
{activeFiltersCount > 0 && (
|
||||
<span className="px-1.5 py-0.5 text-[9px] font-bold bg-blue-400 text-black">{activeFiltersCount}</span>
|
||||
)}
|
||||
>
|
||||
<Diamond className="w-3 h-3" />
|
||||
Pounce
|
||||
</button>
|
||||
</div>
|
||||
<ChevronRight className={clsx("w-4 h-4 text-white/30 transition-transform", filtersOpen && "rotate-90")} />
|
||||
</button>
|
||||
|
||||
<button
|
||||
onClick={() => setHideSpam(!hideSpam)}
|
||||
className={clsx(
|
||||
"flex items-center gap-1.5 px-3 py-2 rounded-full text-xs font-medium whitespace-nowrap transition-all",
|
||||
hideSpam
|
||||
? "bg-white/10 text-white border border-white/20"
|
||||
: "bg-white/[0.03] text-white/40 border border-white/[0.08]"
|
||||
)}
|
||||
>
|
||||
<Ban className="w-3 h-3" />
|
||||
Clean
|
||||
</button>
|
||||
{/* Filters Panel */}
|
||||
{filtersOpen && (
|
||||
<div className="mt-3 p-3 border border-white/[0.08] bg-white/[0.02] space-y-3 animate-in fade-in slide-in-from-top-2 duration-200">
|
||||
{/* Source */}
|
||||
<div>
|
||||
<div className="text-[9px] font-mono text-white/30 uppercase tracking-wider mb-2">Source</div>
|
||||
<div className="flex gap-2">
|
||||
{[
|
||||
{ value: 'all', label: 'All' },
|
||||
{ value: 'pounce', label: 'Pounce', icon: Diamond },
|
||||
{ value: 'external', label: 'External' },
|
||||
].map((item) => (
|
||||
<button
|
||||
key={item.value}
|
||||
onClick={() => setSourceFilter(item.value as SourceFilter)}
|
||||
className={clsx(
|
||||
"flex-1 py-2 text-[10px] font-bold uppercase tracking-wider border transition-colors flex items-center justify-center gap-1",
|
||||
sourceFilter === item.value
|
||||
? "border-accent bg-accent/10 text-accent"
|
||||
: "border-white/[0.08] text-white/40"
|
||||
)}
|
||||
>
|
||||
{item.icon && <item.icon className="w-3 h-3" />}
|
||||
{item.label}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{['com', 'ai', 'io', 'net'].map((tld) => (
|
||||
{/* TLD */}
|
||||
<div>
|
||||
<div className="text-[9px] font-mono text-white/30 uppercase tracking-wider mb-2">TLD</div>
|
||||
<div className="flex gap-2 flex-wrap">
|
||||
{['all', 'com', 'ai', 'io', 'net'].map((tld) => (
|
||||
<button
|
||||
key={tld}
|
||||
onClick={() => setTldFilter(tld)}
|
||||
className={clsx(
|
||||
"px-3 py-1.5 text-[10px] font-mono uppercase border transition-colors",
|
||||
tldFilter === tld
|
||||
? "border-blue-400 bg-blue-400/10 text-blue-400"
|
||||
: "border-white/[0.08] text-white/40"
|
||||
)}
|
||||
>
|
||||
{tld === 'all' ? 'All' : `.${tld}`}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Price */}
|
||||
<div>
|
||||
<div className="text-[9px] font-mono text-white/30 uppercase tracking-wider mb-2">Price</div>
|
||||
<div className="flex gap-2">
|
||||
{[
|
||||
{ value: 'all', label: 'All' },
|
||||
{ value: 'low', label: '< $100' },
|
||||
{ value: 'mid', label: '< $1k' },
|
||||
{ value: 'high', label: '$1k+' },
|
||||
].map((item) => (
|
||||
<button
|
||||
key={item.value}
|
||||
onClick={() => setPriceRange(item.value as PriceRange)}
|
||||
className={clsx(
|
||||
"flex-1 py-1.5 text-[10px] font-mono border transition-colors",
|
||||
priceRange === item.value
|
||||
? "border-amber-400 bg-amber-400/10 text-amber-400"
|
||||
: "border-white/[0.08] text-white/40"
|
||||
)}
|
||||
>
|
||||
{item.label}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Spam Filter */}
|
||||
<button
|
||||
key={tld}
|
||||
onClick={() => setTldFilter(t => t === tld ? 'all' : tld)}
|
||||
onClick={() => setHideSpam(!hideSpam)}
|
||||
className={clsx(
|
||||
"px-3 py-2 rounded-full text-xs font-medium whitespace-nowrap transition-all",
|
||||
tldFilter === tld
|
||||
? "bg-blue-500/20 text-blue-400 border border-blue-500/30"
|
||||
: "bg-white/[0.03] text-white/40 border border-white/[0.08]"
|
||||
"flex items-center justify-between w-full py-2 px-3 border transition-colors",
|
||||
hideSpam ? "border-white/20 bg-white/[0.05]" : "border-white/[0.08]"
|
||||
)}
|
||||
>
|
||||
.{tld}
|
||||
<div className="flex items-center gap-2">
|
||||
<Ban className="w-4 h-4 text-white/40" />
|
||||
<span className="text-xs font-mono text-white/60">Hide spam domains</span>
|
||||
</div>
|
||||
<div className={clsx(
|
||||
"w-4 h-4 border flex items-center justify-center",
|
||||
hideSpam ? "border-accent bg-accent" : "border-white/30"
|
||||
)}>
|
||||
{hideSpam && <span className="text-black text-[10px] font-bold">✓</span>}
|
||||
</div>
|
||||
</button>
|
||||
))}
|
||||
|
||||
{[
|
||||
{ value: 'low', label: '< $100' },
|
||||
{ value: 'mid', label: '< $1k' },
|
||||
{ value: 'high', label: '$1k+' },
|
||||
].map((item) => (
|
||||
<button
|
||||
key={item.value}
|
||||
onClick={() => setPriceRange(p => p === item.value ? 'all' : item.value as PriceRange)}
|
||||
className={clsx(
|
||||
"px-3 py-2 rounded-full text-xs font-medium whitespace-nowrap transition-all",
|
||||
priceRange === item.value
|
||||
? "bg-amber-500/20 text-amber-400 border border-amber-500/30"
|
||||
: "bg-white/[0.03] text-white/40 border border-white/[0.08]"
|
||||
)}
|
||||
>
|
||||
{item.label}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</section>
|
||||
|
||||
{/* ═══════════════════════════════════════════════════════════════════════ */}
|
||||
@ -440,29 +517,29 @@ export default function MarketPage() {
|
||||
<section className="hidden lg:block px-10 pt-10 pb-6">
|
||||
<div className="flex flex-col lg:flex-row lg:items-end lg:justify-between gap-6">
|
||||
<div className="space-y-3">
|
||||
<div className="inline-flex items-center gap-2">
|
||||
<Gavel className="w-4 h-4 text-accent" />
|
||||
<span className="text-[10px] font-mono tracking-wide text-accent">Live Auctions</span>
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="w-1.5 h-1.5 bg-accent animate-pulse" />
|
||||
<span className="text-[10px] font-mono tracking-[0.2em] text-accent uppercase">Live Auctions</span>
|
||||
</div>
|
||||
|
||||
<h1 className="font-display text-[2rem] lg:text-[2.5rem] leading-[1] tracking-[-0.02em]">
|
||||
<h1 className="font-display text-[2.5rem] leading-[1] tracking-[-0.02em]">
|
||||
<span className="text-white">Market</span>
|
||||
<span className="text-white/30 ml-3">{stats.total}</span>
|
||||
<span className="text-white/30 ml-3 font-mono text-[2rem]">{stats.total}</span>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
<div className="flex gap-6 lg:gap-8">
|
||||
<div className="flex gap-8">
|
||||
<div className="text-right">
|
||||
<div className="text-xl font-display text-accent">{stats.pounceCount}</div>
|
||||
<div className="text-[9px] tracking-wide text-white/30 font-mono">Pounce Direct</div>
|
||||
<div className="text-2xl font-bold text-accent font-mono">{stats.pounceCount}</div>
|
||||
<div className="text-[9px] font-mono text-white/30 uppercase tracking-wider">Pounce Direct</div>
|
||||
</div>
|
||||
<div className="text-right">
|
||||
<div className="text-xl font-display text-white">{stats.auctionCount}</div>
|
||||
<div className="text-[9px] tracking-wide text-white/30 font-mono">External</div>
|
||||
<div className="text-2xl font-bold text-white font-mono">{stats.auctionCount}</div>
|
||||
<div className="text-[9px] font-mono text-white/30 uppercase tracking-wider">External</div>
|
||||
</div>
|
||||
<div className="text-right">
|
||||
<div className="text-xl font-display text-amber-400">{stats.highScore}</div>
|
||||
<div className="text-[9px] tracking-wide text-white/30 font-mono">Score 80+</div>
|
||||
<div className="text-2xl font-bold text-amber-400 font-mono">{stats.highScore}</div>
|
||||
<div className="text-[9px] font-mono text-white/30 uppercase tracking-wider">Score 80+</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -476,8 +553,8 @@ export default function MarketPage() {
|
||||
<button
|
||||
onClick={() => setSourceFilter('all')}
|
||||
className={clsx(
|
||||
"px-3 py-1.5 text-xs font-medium transition-colors",
|
||||
sourceFilter === 'all' ? "bg-white/10 text-white" : "text-white/40 hover:text-white/60"
|
||||
"px-3 py-1.5 text-xs font-mono transition-colors border",
|
||||
sourceFilter === 'all' ? "bg-white/10 text-white border-white/20" : "text-white/40 border-transparent hover:text-white/60"
|
||||
)}
|
||||
>
|
||||
All
|
||||
@ -485,27 +562,30 @@ export default function MarketPage() {
|
||||
<button
|
||||
onClick={() => setSourceFilter('pounce')}
|
||||
className={clsx(
|
||||
"px-3 py-1.5 text-xs font-medium transition-colors flex items-center gap-1.5",
|
||||
sourceFilter === 'pounce' ? "bg-accent/20 text-accent" : "text-white/40 hover:text-white/60"
|
||||
"px-3 py-1.5 text-xs font-mono transition-colors flex items-center gap-1.5 border",
|
||||
sourceFilter === 'pounce' ? "bg-accent/20 text-accent border-accent/30" : "text-white/40 border-transparent hover:text-white/60"
|
||||
)}
|
||||
>
|
||||
<Diamond className="w-3 h-3" />
|
||||
Pounce Only
|
||||
Pounce
|
||||
</button>
|
||||
|
||||
<div className="w-px h-5 bg-white/10" />
|
||||
|
||||
<select
|
||||
value={tldFilter}
|
||||
onChange={(e) => setTldFilter(e.target.value)}
|
||||
className="bg-transparent border border-white/10 text-white text-xs px-3 py-1.5 outline-none hover:border-white/20"
|
||||
>
|
||||
<option value="all" className="bg-black">All TLDs</option>
|
||||
<option value="com" className="bg-black">.com</option>
|
||||
<option value="ai" className="bg-black">.ai</option>
|
||||
<option value="io" className="bg-black">.io</option>
|
||||
<option value="net" className="bg-black">.net</option>
|
||||
</select>
|
||||
{['com', 'ai', 'io', 'net'].map((tld) => (
|
||||
<button
|
||||
key={tld}
|
||||
onClick={() => setTldFilter(tldFilter === tld ? 'all' : tld)}
|
||||
className={clsx(
|
||||
"px-3 py-1.5 text-xs font-mono transition-colors border",
|
||||
tldFilter === tld
|
||||
? "bg-blue-400/20 text-blue-400 border-blue-400/30"
|
||||
: "text-white/40 border-transparent hover:text-white/60"
|
||||
)}
|
||||
>
|
||||
.{tld}
|
||||
</button>
|
||||
))}
|
||||
|
||||
<div className="w-px h-5 bg-white/10" />
|
||||
|
||||
@ -516,10 +596,10 @@ export default function MarketPage() {
|
||||
].map((item) => (
|
||||
<button
|
||||
key={item.value}
|
||||
onClick={() => setPriceRange(p => p === item.value ? 'all' : item.value as PriceRange)}
|
||||
onClick={() => setPriceRange(priceRange === item.value ? 'all' : item.value as PriceRange)}
|
||||
className={clsx(
|
||||
"px-3 py-1.5 text-xs font-medium transition-colors",
|
||||
priceRange === item.value ? "bg-white/10 text-white" : "text-white/40 hover:text-white/60"
|
||||
"px-3 py-1.5 text-xs font-mono transition-colors border",
|
||||
priceRange === item.value ? "bg-amber-400/20 text-amber-400 border-amber-400/30" : "text-white/40 border-transparent hover:text-white/60"
|
||||
)}
|
||||
>
|
||||
{item.label}
|
||||
@ -531,30 +611,31 @@ export default function MarketPage() {
|
||||
<button
|
||||
onClick={() => setHideSpam(!hideSpam)}
|
||||
className={clsx(
|
||||
"px-3 py-1.5 text-xs font-medium transition-colors flex items-center gap-1.5",
|
||||
hideSpam ? "bg-white/10 text-white" : "text-white/40 hover:text-white/60"
|
||||
"px-3 py-1.5 text-xs font-mono transition-colors flex items-center gap-1.5 border",
|
||||
hideSpam ? "bg-white/10 text-white border-white/20" : "text-white/40 border-transparent hover:text-white/60"
|
||||
)}
|
||||
>
|
||||
<Ban className="w-3 h-3" />
|
||||
Hide spam
|
||||
Clean
|
||||
</button>
|
||||
|
||||
<div className="flex-1" />
|
||||
|
||||
<div className="relative">
|
||||
<Search className="absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-white/30" />
|
||||
<input
|
||||
type="text"
|
||||
value={searchQuery}
|
||||
onChange={(e) => setSearchQuery(e.target.value)}
|
||||
placeholder="Search domains..."
|
||||
className="bg-[#050505] border border-white/10 pl-9 pr-4 py-2 text-sm text-white placeholder:text-white/25 outline-none focus:border-accent/40 w-48 lg:w-64"
|
||||
placeholder="Search..."
|
||||
className="bg-white/[0.02] border border-white/10 pl-9 pr-4 py-2 text-sm text-white placeholder:text-white/25 outline-none focus:border-accent/40 w-48 font-mono"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<button
|
||||
onClick={handleRefresh}
|
||||
disabled={refreshing}
|
||||
className="p-2 text-white/30 hover:text-white transition-colors"
|
||||
className="p-2 text-white/30 hover:text-white transition-colors border border-white/10"
|
||||
>
|
||||
<RefreshCw className={clsx("w-4 h-4", refreshing && "animate-spin")} />
|
||||
</button>
|
||||
@ -564,23 +645,21 @@ export default function MarketPage() {
|
||||
{/* ═══════════════════════════════════════════════════════════════════════ */}
|
||||
{/* CONTENT */}
|
||||
{/* ═══════════════════════════════════════════════════════════════════════ */}
|
||||
<section className="px-4 lg:px-10 py-4 lg:py-6 pb-28 lg:pb-10">
|
||||
<section className="px-4 lg:px-10 py-4 pb-28 lg:pb-10">
|
||||
{loading ? (
|
||||
<div className="flex items-center justify-center py-20">
|
||||
<Loader2 className="w-6 h-6 text-accent animate-spin" />
|
||||
</div>
|
||||
) : filteredItems.length === 0 ? (
|
||||
<div className="text-center py-16">
|
||||
<div className="w-14 h-14 mx-auto bg-white/[0.02] border border-white/10 rounded-lg flex items-center justify-center mb-4">
|
||||
<Search className="w-6 h-6 text-white/20" />
|
||||
</div>
|
||||
<p className="text-white/40 text-sm">No domains found</p>
|
||||
<p className="text-white/25 text-xs mt-1">Try adjusting your filters</p>
|
||||
<div className="text-center py-16 border border-dashed border-white/[0.08]">
|
||||
<Search className="w-8 h-8 text-white/10 mx-auto mb-3" />
|
||||
<p className="text-white/40 text-sm font-mono">No domains found</p>
|
||||
<p className="text-white/25 text-xs font-mono mt-1">Try adjusting filters</p>
|
||||
</div>
|
||||
) : (
|
||||
<>
|
||||
{/* Mobile Cards */}
|
||||
<div className="lg:hidden space-y-3">
|
||||
{/* Results List */}
|
||||
<div className="space-y-px bg-white/[0.04] border border-white/[0.08]">
|
||||
{filteredItems.map((item) => {
|
||||
const timeLeftSec = getSecondsUntilEnd(item.end_time)
|
||||
const isUrgent = timeLeftSec > 0 && timeLeftSec < 3600
|
||||
@ -593,25 +672,33 @@ export default function MarketPage() {
|
||||
<div
|
||||
key={item.id}
|
||||
className={clsx(
|
||||
"bg-[#0A0A0A] border rounded-xl overflow-hidden",
|
||||
isPounce ? "border-accent/20" : "border-white/[0.06]"
|
||||
"bg-[#020202] hover:bg-white/[0.02] transition-all",
|
||||
isPounce && "bg-accent/[0.02]"
|
||||
)}
|
||||
>
|
||||
<div className="p-4">
|
||||
<div className="flex items-start justify-between gap-3 mb-3">
|
||||
<div className="flex items-center gap-3 min-w-0">
|
||||
{isPounce ? (
|
||||
<div className="w-10 h-10 bg-accent/10 border border-accent/20 rounded-lg flex items-center justify-center shrink-0">
|
||||
<Diamond className="w-5 h-5 text-accent" />
|
||||
{/* Mobile Row */}
|
||||
<div className="lg:hidden p-3">
|
||||
<div className="flex items-start justify-between gap-3 mb-2">
|
||||
<div className="flex items-center gap-3 min-w-0 flex-1">
|
||||
<div className={clsx(
|
||||
"w-8 h-8 flex items-center justify-center border shrink-0",
|
||||
isPounce ? "bg-accent/10 border-accent/20" : "bg-white/[0.02] border-white/[0.06]"
|
||||
)}>
|
||||
{isPounce ? (
|
||||
<Diamond className="w-4 h-4 text-accent" />
|
||||
) : (
|
||||
<span className="text-[9px] font-mono text-white/40">{item.source.substring(0, 2).toUpperCase()}</span>
|
||||
)}
|
||||
</div>
|
||||
<div className="min-w-0 flex-1">
|
||||
<div className="text-sm font-bold text-white font-mono truncate">{item.domain}</div>
|
||||
<div className="flex items-center gap-2 text-[10px] font-mono text-white/30">
|
||||
<span className="uppercase">{item.source}</span>
|
||||
<span className="text-white/10">|</span>
|
||||
<span className={clsx(isUrgent && "text-orange-400")}>
|
||||
{isPounce ? 'Instant' : displayTime || 'N/A'}
|
||||
</span>
|
||||
</div>
|
||||
) : (
|
||||
<div className="w-10 h-10 bg-white/[0.03] border border-white/[0.06] rounded-lg flex items-center justify-center text-[10px] font-mono text-white/40 shrink-0">
|
||||
{item.source.substring(0, 2).toUpperCase()}
|
||||
</div>
|
||||
)}
|
||||
<div className="min-w-0">
|
||||
<div className="text-sm font-bold text-white truncate">{item.domain}</div>
|
||||
<div className="text-[10px] text-white/40">{item.source}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -623,54 +710,36 @@ export default function MarketPage() {
|
||||
{formatPrice(item.price)}
|
||||
</div>
|
||||
<div className={clsx(
|
||||
"text-[10px] font-medium",
|
||||
isUrgent ? "text-orange-400" : "text-white/40"
|
||||
"text-[9px] font-mono px-1 py-0.5 inline-block",
|
||||
item.pounce_score >= 80 ? "text-accent bg-accent/10" :
|
||||
item.pounce_score >= 50 ? "text-amber-400 bg-amber-400/10" :
|
||||
"text-white/30 bg-white/5"
|
||||
)}>
|
||||
{isPounce ? (
|
||||
<span className="flex items-center justify-end gap-1">
|
||||
<Zap className="w-3 h-3" />
|
||||
Instant
|
||||
</span>
|
||||
) : (
|
||||
<span className="flex items-center justify-end gap-1">
|
||||
<Clock className="w-3 h-3" />
|
||||
{displayTime || 'N/A'}
|
||||
</span>
|
||||
)}
|
||||
Score {item.pounce_score}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Score & Actions */}
|
||||
<div className="flex items-center gap-3 pt-3 border-t border-white/[0.05]">
|
||||
<span className={clsx(
|
||||
"text-[10px] font-mono font-bold px-2 py-1 rounded-sm",
|
||||
item.pounce_score >= 80 ? "text-accent bg-accent/10" :
|
||||
item.pounce_score >= 50 ? "text-amber-400 bg-amber-400/10" :
|
||||
"text-white/40 bg-white/5"
|
||||
)}>
|
||||
Score {item.pounce_score}
|
||||
</span>
|
||||
|
||||
<div className="flex-1" />
|
||||
|
||||
{/* Actions */}
|
||||
<div className="flex gap-2">
|
||||
<button
|
||||
onClick={() => handleTrack(item.domain)}
|
||||
disabled={isTracking}
|
||||
className={clsx(
|
||||
"w-10 h-10 flex items-center justify-center rounded-lg border transition-all active:scale-95",
|
||||
"flex-1 py-2 text-[10px] font-bold uppercase tracking-wider border flex items-center justify-center gap-1.5 transition-all",
|
||||
isTracked
|
||||
? "bg-accent/10 text-accent border-accent/20"
|
||||
: "bg-white/[0.03] text-white/40 border-white/[0.08]"
|
||||
? "border-accent bg-accent/10 text-accent"
|
||||
: "border-white/[0.08] text-white/40"
|
||||
)}
|
||||
>
|
||||
{isTracking ? (
|
||||
<Loader2 className="w-4 h-4 animate-spin" />
|
||||
<Loader2 className="w-3 h-3 animate-spin" />
|
||||
) : isTracked ? (
|
||||
<Eye className="w-4 h-4" />
|
||||
<Eye className="w-3 h-3" />
|
||||
) : (
|
||||
<EyeOff className="w-4 h-4" />
|
||||
<EyeOff className="w-3 h-3" />
|
||||
)}
|
||||
{isTracked ? 'Tracked' : 'Track'}
|
||||
</button>
|
||||
|
||||
<a
|
||||
@ -678,80 +747,53 @@ export default function MarketPage() {
|
||||
target={isPounce ? "_self" : "_blank"}
|
||||
rel={isPounce ? undefined : "noopener noreferrer"}
|
||||
className={clsx(
|
||||
"h-10 px-5 flex items-center gap-2 rounded-lg text-sm font-bold transition-all active:scale-95",
|
||||
"flex-1 py-2 text-[10px] font-bold uppercase tracking-wider flex items-center justify-center gap-1.5 transition-all",
|
||||
isPounce
|
||||
? "bg-accent text-[#020202]"
|
||||
? "bg-accent text-black"
|
||||
: "bg-white/10 text-white"
|
||||
)}
|
||||
>
|
||||
{isPounce ? 'Buy' : 'Bid'}
|
||||
{!isPounce && <ExternalLink className="w-4 h-4" />}
|
||||
{!isPounce && <ExternalLink className="w-3 h-3" />}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
|
||||
{/* Desktop Table */}
|
||||
<div className="hidden lg:block space-y-px">
|
||||
<div className="grid grid-cols-[1fr_80px_100px_100px_120px] gap-4 px-4 py-2 text-xs text-white/40 border-b border-white/[0.06]">
|
||||
<div>Domain</div>
|
||||
<div className="text-center">Score</div>
|
||||
<div className="text-right">Price</div>
|
||||
<div className="text-center">Time</div>
|
||||
<div className="text-right">Actions</div>
|
||||
</div>
|
||||
|
||||
{filteredItems.map((item) => {
|
||||
const timeLeftSec = getSecondsUntilEnd(item.end_time)
|
||||
const isUrgent = timeLeftSec > 0 && timeLeftSec < 3600
|
||||
const isPounce = item.is_pounce
|
||||
const displayTime = item.status === 'auction' ? calcTimeRemaining(item.end_time) : null
|
||||
const isTracked = trackedDomains.has(item.domain)
|
||||
const isTracking = trackingInProgress === item.domain
|
||||
|
||||
return (
|
||||
<div
|
||||
key={item.id}
|
||||
className={clsx(
|
||||
"group border border-white/[0.05] hover:border-white/[0.08] transition-all",
|
||||
isPounce ? "bg-accent/[0.02]" : "bg-white/[0.01]"
|
||||
)}
|
||||
>
|
||||
<div className="grid grid-cols-[1fr_80px_100px_100px_120px] gap-4 items-center px-4 py-3">
|
||||
<div className="flex items-center gap-3 min-w-0">
|
||||
{isPounce ? (
|
||||
<div className="w-8 h-8 bg-accent/10 border border-accent/20 flex items-center justify-center shrink-0">
|
||||
{/* Desktop Row */}
|
||||
<div className="hidden lg:flex items-center justify-between p-3 gap-4 group">
|
||||
<div className="flex items-center gap-3 min-w-0 flex-1">
|
||||
<div className={clsx(
|
||||
"w-8 h-8 flex items-center justify-center border shrink-0",
|
||||
isPounce ? "bg-accent/10 border-accent/20" : "bg-white/[0.02] border-white/[0.06]"
|
||||
)}>
|
||||
{isPounce ? (
|
||||
<Diamond className="w-4 h-4 text-accent" />
|
||||
</div>
|
||||
) : (
|
||||
<div className="w-8 h-8 bg-white/5 border border-white/10 flex items-center justify-center text-[10px] font-mono text-white/40 shrink-0">
|
||||
{item.source.substring(0, 2).toUpperCase()}
|
||||
</div>
|
||||
)}
|
||||
) : (
|
||||
<span className="text-[9px] font-mono text-white/40">{item.source.substring(0, 2).toUpperCase()}</span>
|
||||
)}
|
||||
</div>
|
||||
<div className="min-w-0">
|
||||
<div className="text-sm font-medium text-white truncate">{item.domain}</div>
|
||||
<div className="text-[10px] text-white/30 flex items-center gap-1.5">
|
||||
{item.source}
|
||||
<div className="text-sm font-bold text-white font-mono truncate group-hover:text-accent transition-colors">{item.domain}</div>
|
||||
<div className="flex items-center gap-2 text-[10px] font-mono text-white/30">
|
||||
<span className="uppercase">{item.source}</span>
|
||||
{isPounce && item.verified && (
|
||||
<>
|
||||
<span className="text-white/20">·</span>
|
||||
<span className="text-white/10">|</span>
|
||||
<span className="text-accent flex items-center gap-0.5">
|
||||
<ShieldCheck className="w-3 h-3" />
|
||||
Verified
|
||||
</span>
|
||||
</>
|
||||
)}
|
||||
{item.num_bids ? <><span className="text-white/20">·</span>{item.num_bids} bids</> : null}
|
||||
{item.num_bids ? <><span className="text-white/10">|</span>{item.num_bids} bids</> : null}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="text-center">
|
||||
{/* Score */}
|
||||
<div className="w-16 text-center shrink-0">
|
||||
<span className={clsx(
|
||||
"text-xs font-mono font-medium px-2 py-0.5",
|
||||
"text-xs font-mono font-bold px-2 py-0.5",
|
||||
item.pounce_score >= 80 ? "text-accent bg-accent/10" :
|
||||
item.pounce_score >= 50 ? "text-amber-400 bg-amber-400/10" :
|
||||
"text-white/40 bg-white/5"
|
||||
@ -760,21 +802,23 @@ export default function MarketPage() {
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div className="text-right">
|
||||
{/* Price */}
|
||||
<div className="w-24 text-right shrink-0">
|
||||
<div className={clsx(
|
||||
"font-mono text-sm font-medium",
|
||||
"font-mono text-sm font-bold",
|
||||
isPounce ? "text-accent" : "text-white"
|
||||
)}>
|
||||
{formatPrice(item.price)}
|
||||
</div>
|
||||
<div className="text-[10px] text-white/30">
|
||||
<div className="text-[9px] font-mono text-white/30 uppercase">
|
||||
{item.price_type === 'bid' ? 'Bid' : 'Buy Now'}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="text-center">
|
||||
{/* Time */}
|
||||
<div className="w-20 text-center shrink-0">
|
||||
{isPounce ? (
|
||||
<span className="text-xs text-accent font-medium flex items-center justify-center gap-1">
|
||||
<span className="text-xs text-accent font-mono flex items-center justify-center gap-1">
|
||||
<Zap className="w-3 h-3" />
|
||||
Instant
|
||||
</span>
|
||||
@ -788,11 +832,11 @@ export default function MarketPage() {
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="flex items-center justify-end gap-2 opacity-50 group-hover:opacity-100 transition-opacity">
|
||||
{/* Actions */}
|
||||
<div className="flex items-center gap-2 shrink-0 opacity-50 group-hover:opacity-100 transition-opacity">
|
||||
<button
|
||||
onClick={() => handleTrack(item.domain)}
|
||||
disabled={isTracking}
|
||||
title={isTracked ? "Stop tracking" : "Start tracking"}
|
||||
className={clsx(
|
||||
"w-7 h-7 flex items-center justify-center border transition-colors",
|
||||
isTracked
|
||||
@ -814,7 +858,7 @@ export default function MarketPage() {
|
||||
target={isPounce ? "_self" : "_blank"}
|
||||
rel={isPounce ? undefined : "noopener noreferrer"}
|
||||
className={clsx(
|
||||
"h-7 px-3 flex items-center gap-1.5 text-xs font-semibold transition-colors",
|
||||
"h-7 px-3 flex items-center gap-1.5 text-xs font-bold transition-colors",
|
||||
isPounce
|
||||
? "bg-accent text-black hover:bg-white"
|
||||
: "bg-white/10 text-white hover:bg-white/20"
|
||||
@ -832,15 +876,15 @@ export default function MarketPage() {
|
||||
|
||||
{/* Pagination */}
|
||||
{totalPages > 1 && (
|
||||
<div className="flex items-center justify-between pt-6">
|
||||
<div className="text-xs text-white/40 font-mono">
|
||||
Page {page} of {totalPages}
|
||||
<div className="flex items-center justify-between pt-4">
|
||||
<div className="text-[10px] text-white/40 font-mono uppercase tracking-wider">
|
||||
Page {page}/{totalPages} · {stats.total} domains
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="flex items-center gap-1">
|
||||
<button
|
||||
onClick={() => handlePageChange(page - 1)}
|
||||
disabled={page === 1}
|
||||
className="w-10 h-10 lg:w-8 lg:h-8 flex items-center justify-center border border-white/10 rounded-lg lg:rounded-none text-white/50 hover:text-white hover:bg-white/5 disabled:opacity-30 disabled:cursor-not-allowed transition-colors"
|
||||
className="w-8 h-8 flex items-center justify-center border border-white/10 text-white/50 hover:text-white hover:bg-white/5 disabled:opacity-30 disabled:cursor-not-allowed transition-colors"
|
||||
>
|
||||
<ChevronLeft className="w-4 h-4" />
|
||||
</button>
|
||||
@ -876,13 +920,13 @@ export default function MarketPage() {
|
||||
</div>
|
||||
|
||||
<span className="lg:hidden text-xs text-white/50 font-mono px-2">
|
||||
{page} / {totalPages}
|
||||
{page}/{totalPages}
|
||||
</span>
|
||||
|
||||
<button
|
||||
onClick={() => handlePageChange(page + 1)}
|
||||
disabled={page === totalPages}
|
||||
className="w-10 h-10 lg:w-8 lg:h-8 flex items-center justify-center border border-white/10 rounded-lg lg:rounded-none text-white/50 hover:text-white hover:bg-white/5 disabled:opacity-30 disabled:cursor-not-allowed transition-colors"
|
||||
className="w-8 h-8 flex items-center justify-center border border-white/10 text-white/50 hover:text-white hover:bg-white/5 disabled:opacity-30 disabled:cursor-not-allowed transition-colors"
|
||||
>
|
||||
<ChevronRight className="w-4 h-4" />
|
||||
</button>
|
||||
@ -897,33 +941,33 @@ export default function MarketPage() {
|
||||
{/* MOBILE BOTTOM NAV */}
|
||||
{/* ═══════════════════════════════════════════════════════════════════════ */}
|
||||
<nav
|
||||
className="lg:hidden fixed bottom-0 left-0 right-0 z-50 bg-[#020202]/90 backdrop-blur-xl border-t border-white/[0.08]"
|
||||
className="lg:hidden fixed bottom-0 left-0 right-0 z-50 bg-[#020202] border-t border-white/[0.08]"
|
||||
style={{ paddingBottom: 'env(safe-area-inset-bottom)' }}
|
||||
>
|
||||
<div className="flex items-stretch h-[60px]">
|
||||
<div className="flex items-stretch h-14">
|
||||
{mobileNavItems.map((item) => (
|
||||
<Link
|
||||
key={item.href}
|
||||
href={item.href}
|
||||
className={clsx(
|
||||
"flex-1 flex flex-col items-center justify-center gap-1 relative transition-colors active:scale-95",
|
||||
"flex-1 flex flex-col items-center justify-center gap-0.5 relative transition-colors",
|
||||
item.active ? "text-blue-400" : "text-white/40 active:text-white/80"
|
||||
)}
|
||||
>
|
||||
{item.active && (
|
||||
<div className="absolute top-0 left-1/2 -translate-x-1/2 w-8 h-0.5 bg-blue-400 shadow-[0_0_10px_rgba(59,130,246,0.8)]" />
|
||||
<div className="absolute top-0 left-1/2 -translate-x-1/2 w-10 h-0.5 bg-blue-400" />
|
||||
)}
|
||||
<item.icon className={clsx("w-5 h-5 transition-transform", item.active && "scale-110")} />
|
||||
<span className="text-[10px] font-medium">{item.label}</span>
|
||||
<item.icon className="w-5 h-5" />
|
||||
<span className="text-[9px] font-mono uppercase tracking-wider">{item.label}</span>
|
||||
</Link>
|
||||
))}
|
||||
|
||||
<button
|
||||
onClick={() => setMenuOpen(true)}
|
||||
className="flex-1 flex flex-col items-center justify-center gap-1 text-white/40 active:text-white/80 active:scale-95 transition-all"
|
||||
className="flex-1 flex flex-col items-center justify-center gap-0.5 text-white/40 active:text-white/80 transition-all"
|
||||
>
|
||||
<Menu className="w-5 h-5" />
|
||||
<span className="text-[10px] font-medium">Menu</span>
|
||||
<span className="text-[9px] font-mono uppercase tracking-wider">Menu</span>
|
||||
</button>
|
||||
</div>
|
||||
</nav>
|
||||
@ -934,64 +978,61 @@ export default function MarketPage() {
|
||||
{menuOpen && (
|
||||
<div className="lg:hidden fixed inset-0 z-[100]">
|
||||
<div
|
||||
className="absolute inset-0 bg-black/60 backdrop-blur-sm animate-in fade-in duration-300"
|
||||
className="absolute inset-0 bg-black/80 animate-in fade-in duration-200"
|
||||
onClick={() => setMenuOpen(false)}
|
||||
/>
|
||||
|
||||
<div className="absolute top-0 right-0 bottom-0 w-[85%] max-w-[320px] bg-[#0A0A0A] border-l border-white/[0.08] shadow-2xl animate-in slide-in-from-right duration-300 flex flex-col" style={{ paddingTop: 'env(safe-area-inset-top)', paddingBottom: 'env(safe-area-inset-bottom)' }}>
|
||||
<div className="absolute top-0 right-0 bottom-0 w-[80%] max-w-[300px] bg-[#0A0A0A] border-l border-white/[0.08] animate-in slide-in-from-right duration-300 flex flex-col" style={{ paddingTop: 'env(safe-area-inset-top)', paddingBottom: 'env(safe-area-inset-bottom)' }}>
|
||||
|
||||
<div className="flex items-center justify-between p-5 border-b border-white/[0.08]">
|
||||
<div className="flex items-center justify-between p-4 border-b border-white/[0.08]">
|
||||
<div className="flex items-center gap-3">
|
||||
<Image src="/pounce-puma.png" alt="Pounce" width={32} height={32} className="object-contain" />
|
||||
<Image src="/pounce-puma.png" alt="Pounce" width={28} height={28} className="object-contain" />
|
||||
<div>
|
||||
<h2 className="text-sm font-bold text-white tracking-wide">POUNCE</h2>
|
||||
<p className="text-[10px] text-white/40 font-mono tracking-widest uppercase">Terminal</p>
|
||||
<h2 className="text-sm font-bold text-white tracking-wider">POUNCE</h2>
|
||||
<p className="text-[9px] text-white/40 font-mono uppercase tracking-widest">Terminal v1.0</p>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
onClick={() => setMenuOpen(false)}
|
||||
className="w-10 h-10 flex items-center justify-center bg-white/5 rounded-full text-white/60 hover:text-white active:scale-95 transition-all"
|
||||
className="w-8 h-8 flex items-center justify-center border border-white/10 text-white/60 hover:text-white active:bg-white/5 transition-all"
|
||||
>
|
||||
<X className="w-5 h-5" />
|
||||
<X className="w-4 h-4" />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div className="flex-1 overflow-y-auto py-6 space-y-8">
|
||||
<div className="flex-1 overflow-y-auto py-4">
|
||||
{drawerNavSections.map((section) => (
|
||||
<div key={section.title}>
|
||||
<div className="flex items-center gap-2 px-6 mb-3">
|
||||
<div className="w-1 h-3 bg-accent rounded-full" />
|
||||
<span className="text-[11px] font-bold text-white/40 uppercase tracking-[0.2em]">{section.title}</span>
|
||||
<div key={section.title} className="mb-4">
|
||||
<div className="flex items-center gap-2 px-4 mb-2">
|
||||
<div className="w-1 h-3 bg-accent" />
|
||||
<span className="text-[9px] font-bold text-white/30 uppercase tracking-[0.2em]">{section.title}</span>
|
||||
</div>
|
||||
<div className="space-y-1">
|
||||
<div>
|
||||
{section.items.map((item: any) => (
|
||||
<Link
|
||||
key={item.href}
|
||||
href={item.href}
|
||||
onClick={() => setMenuOpen(false)}
|
||||
className="flex items-center gap-4 px-6 py-3.5 text-white/70 active:text-white active:bg-white/[0.03] transition-colors border-l-2 border-transparent active:border-accent"
|
||||
className="flex items-center gap-3 px-4 py-2.5 text-white/60 active:text-white active:bg-white/[0.03] transition-colors border-l-2 border-transparent active:border-accent"
|
||||
>
|
||||
<item.icon className="w-5 h-5 text-white/40" />
|
||||
<item.icon className="w-4 h-4 text-white/30" />
|
||||
<span className="text-sm font-medium flex-1">{item.label}</span>
|
||||
{item.isNew && (
|
||||
<span className="px-2 py-0.5 text-[9px] font-bold bg-accent text-[#020202] rounded-sm">
|
||||
NEW
|
||||
</span>
|
||||
<span className="px-1.5 py-0.5 text-[8px] font-bold bg-accent text-black">NEW</span>
|
||||
)}
|
||||
<ChevronRight className="w-4 h-4 text-white/10" />
|
||||
</Link>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
|
||||
<div className="pt-4 border-t border-white/[0.08] mx-6">
|
||||
<div className="pt-3 border-t border-white/[0.08] mx-4">
|
||||
<Link
|
||||
href="/terminal/settings"
|
||||
onClick={() => setMenuOpen(false)}
|
||||
className="flex items-center gap-3 py-3 text-white/60 active:text-white transition-colors"
|
||||
className="flex items-center gap-3 py-2.5 text-white/50 active:text-white transition-colors"
|
||||
>
|
||||
<Settings className="w-5 h-5" />
|
||||
<Settings className="w-4 h-4" />
|
||||
<span className="text-sm font-medium">Settings</span>
|
||||
</Link>
|
||||
|
||||
@ -999,32 +1040,25 @@ export default function MarketPage() {
|
||||
<Link
|
||||
href="/admin"
|
||||
onClick={() => setMenuOpen(false)}
|
||||
className="flex items-center gap-3 py-3 text-amber-500/80 active:text-amber-400 transition-colors"
|
||||
className="flex items-center gap-3 py-2.5 text-amber-500/70 active:text-amber-400 transition-colors"
|
||||
>
|
||||
<Shield className="w-5 h-5" />
|
||||
<span className="text-sm font-medium">Admin Panel</span>
|
||||
<Shield className="w-4 h-4" />
|
||||
<span className="text-sm font-medium">Admin</span>
|
||||
</Link>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="p-5 bg-white/[0.02] border-t border-white/[0.08]">
|
||||
<div className="flex items-center gap-3 mb-4">
|
||||
<div className="w-10 h-10 bg-gradient-to-br from-accent/20 to-accent/5 rounded-full flex items-center justify-center border border-accent/20">
|
||||
<TierIcon className="w-5 h-5 text-accent" />
|
||||
<div className="p-4 bg-white/[0.02] border-t border-white/[0.08]">
|
||||
<div className="flex items-center gap-3 mb-3">
|
||||
<div className="w-8 h-8 bg-accent/10 border border-accent/20 flex items-center justify-center">
|
||||
<TierIcon className="w-4 h-4 text-accent" />
|
||||
</div>
|
||||
<div className="flex-1 min-w-0">
|
||||
<p className="text-sm font-bold text-white truncate">
|
||||
{user?.name || user?.email?.split('@')[0] || 'User'}
|
||||
</p>
|
||||
<p className={clsx(
|
||||
"text-[10px] font-mono uppercase tracking-wider",
|
||||
tierName === 'Tycoon' ? "text-amber-400" :
|
||||
tierName === 'Trader' ? "text-accent" :
|
||||
"text-white/40"
|
||||
)}>
|
||||
{tierName} Plan
|
||||
</p>
|
||||
<p className="text-[9px] font-mono text-white/40 uppercase tracking-wider">{tierName}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -1032,18 +1066,18 @@ export default function MarketPage() {
|
||||
<Link
|
||||
href="/pricing"
|
||||
onClick={() => setMenuOpen(false)}
|
||||
className="flex items-center justify-center gap-2 w-full py-3 bg-white text-black text-sm font-bold rounded-lg active:scale-[0.98] transition-all mb-3 shadow-lg"
|
||||
className="flex items-center justify-center gap-2 w-full py-2.5 bg-accent text-black text-xs font-bold uppercase tracking-wider active:scale-[0.98] transition-all mb-2"
|
||||
>
|
||||
<Sparkles className="w-4 h-4 text-accent" />
|
||||
Upgrade Now
|
||||
<Sparkles className="w-3 h-3" />
|
||||
Upgrade
|
||||
</Link>
|
||||
)}
|
||||
|
||||
<button
|
||||
onClick={() => { logout(); setMenuOpen(false) }}
|
||||
className="flex items-center justify-center gap-2 w-full py-3 border border-white/10 rounded-lg text-white/50 text-xs font-bold uppercase tracking-wider hover:text-white active:bg-white/5 transition-all"
|
||||
className="flex items-center justify-center gap-2 w-full py-2 border border-white/10 text-white/40 text-[10px] font-mono uppercase tracking-wider active:bg-white/5 transition-all"
|
||||
>
|
||||
<LogOut className="w-4 h-4" />
|
||||
<LogOut className="w-3 h-3" />
|
||||
Sign out
|
||||
</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user