feat(payment): sync plans and add coins rules

This commit is contained in:
2026-06-29 14:11:50 +08:00
parent 274fe87ced
commit e372d58b4c
24 changed files with 1099 additions and 224 deletions
@@ -7,6 +7,7 @@ import styles from "./sidebar-wallet-card.module.css";
export interface SidebarWalletCardProps {
creditBalance: number;
onTopUp: () => void;
onRulesClick: () => void;
}
const formatCoins = (value: number): string =>
@@ -15,6 +16,7 @@ const formatCoins = (value: number): string =>
export function SidebarWalletCard({
creditBalance,
onTopUp,
onRulesClick,
}: SidebarWalletCardProps) {
return (
<section className={styles.card} aria-label="My wallet">
@@ -31,7 +33,11 @@ export function SidebarWalletCard({
<span className={styles.balanceUnit}> coins</span>
</p>
<button type="button" className={styles.rulesButton}>
<button
type="button"
className={styles.rulesButton}
onClick={onRulesClick}
>
Coins
</button>
</div>