refactor(goods): 移除地区选择器组件并优化首页界面
This commit is contained in:
@@ -13,6 +13,7 @@ import {
|
||||
Coins,
|
||||
Gauge,
|
||||
History,
|
||||
Sparkles,
|
||||
UserRound,
|
||||
} from 'lucide-react'
|
||||
import type {
|
||||
@@ -86,7 +87,6 @@ function HomePage() {
|
||||
const {assetsInfo} = useAssetsQuery()
|
||||
const claimProgress = getProgressPercent(assetsInfo?.today_claimed, assetsInfo?.today_limit)
|
||||
const isClaimAvailable = (assetsInfo?.locked_points ?? 0) > 0
|
||||
const isEnglish = normalizeLanguage(language) === 'en'
|
||||
const previewCategories: ProductCategory[] = productCategories.map((category) => ({
|
||||
...category,
|
||||
items: category.items.slice(0, 4),
|
||||
@@ -221,16 +221,12 @@ function HomePage() {
|
||||
</div>
|
||||
|
||||
<div className="flex min-w-0 flex-1 flex-col gap-3">
|
||||
<div className="grid grid-cols-2 gap-3">
|
||||
<div className="grid grid-cols-[minmax(0,7fr)_minmax(0,3fr)] gap-3">
|
||||
<div
|
||||
className="home-withdraw-card pc-hover-float h-full min-h-[120px] py-[14px] sm:py-[18px]">
|
||||
<div className="flex h-full w-full flex-col justify-between gap-[18px]">
|
||||
<div
|
||||
className={`text-center text-white/68 ${
|
||||
isEnglish
|
||||
? 'text-[10px] tracking-[0.01em] sm:text-[13px] sm:tracking-[0.06em]'
|
||||
: 'text-[11px] tracking-[0.04em] sm:text-[14px] sm:tracking-[0.16em]'
|
||||
}`}>{t('home.availableForWithdrawal')}</div>
|
||||
className="text-center text-[11px] font-medium tracking-[0.06em] text-white/88 drop-shadow-[0_1px_10px_rgba(0,0,0,0.28)] sm:text-[14px] sm:tracking-[0.16em]">{t('home.availableForWithdrawal')}</div>
|
||||
<div className="flex flex-1 items-center justify-center text-center">
|
||||
<div
|
||||
className="min-w-0 break-all text-[clamp(1.6rem,5vw,2.6rem)] font-semibold leading-none tracking-[-0.02em] text-white">
|
||||
@@ -243,13 +239,18 @@ function HomePage() {
|
||||
</div>
|
||||
|
||||
<div
|
||||
className="home-withdraw-card pc-hover-float h-full min-h-[120px] px-[12px] py-[14px] sm:px-[16px] sm:py-[18px]">
|
||||
className="home-stat-card home-stat-card-claim pc-hover-float h-full min-h-[120px] px-[12px] py-[14px] sm:px-[16px] sm:py-[18px]">
|
||||
<div className="flex h-full w-full flex-col justify-between gap-[18px]">
|
||||
<div
|
||||
className="text-center text-[12px] tracking-[0.08em] text-white/68 sm:text-[14px] sm:tracking-[0.16em]">{t('home.availablePoints')}</div>
|
||||
<div className="flex items-start justify-between gap-[10px]">
|
||||
<div
|
||||
className="text-[11px] font-medium tracking-[0.06em] text-white/82 sm:text-[13px] sm:tracking-[0.14em]">{t('home.availablePoints')}</div>
|
||||
<div className="flex h-[30px] w-[30px] shrink-0 items-center justify-center rounded-[10px] bg-[#d58a2d]/18 text-[#f5a322] sm:h-[34px] sm:w-[34px] sm:rounded-[12px]">
|
||||
<Sparkles className="h-[14px] w-[14px] sm:h-[16px] sm:w-[16px]" aria-hidden="true"/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex flex-1 items-center justify-center text-center">
|
||||
<div
|
||||
className="min-w-0 break-all text-[clamp(1.6rem,5vw,2.6rem)] font-semibold leading-none tracking-[-0.02em] text-white">
|
||||
className="min-w-0 break-all text-[clamp(1.2rem,4vw,1.9rem)] font-semibold leading-none tracking-[-0.02em] text-white">
|
||||
{assetsInfo?.available_points || 0}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user