From 227a8468a94601163357d6ff1b76025e556c0fef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Thu, 16 Jul 2026 20:05:53 +0800 Subject: [PATCH] move and rename PlatformMudPointWalletEntry to index.tsx inside same name dir --- .../index.test.tsx} | 4 ++-- .../index.tsx} | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) rename packages/shared/src/components/{PlatformMudPointWalletEntry.test.tsx => PlatformMudPointWalletEntry/index.test.tsx} (97%) rename packages/shared/src/components/{PlatformMudPointWalletEntry.tsx => PlatformMudPointWalletEntry/index.tsx} (96%) diff --git a/packages/shared/src/components/PlatformMudPointWalletEntry.test.tsx b/packages/shared/src/components/PlatformMudPointWalletEntry/index.test.tsx similarity index 97% rename from packages/shared/src/components/PlatformMudPointWalletEntry.test.tsx rename to packages/shared/src/components/PlatformMudPointWalletEntry/index.test.tsx index dbace6b73..d87261cc7 100644 --- a/packages/shared/src/components/PlatformMudPointWalletEntry.test.tsx +++ b/packages/shared/src/components/PlatformMudPointWalletEntry/index.test.tsx @@ -10,8 +10,8 @@ import { import userEvent from '@testing-library/user-event'; import { expect, test, vi } from 'vitest'; -import { formatMudPointCount } from '../utils/format'; -import { PlatformMudPointWalletEntry } from './PlatformMudPointWalletEntry.tsx'; +import { formatMudPointCount } from '../../utils/format'; +import { PlatformMudPointWalletEntry } from './index.tsx'; const breakdown = { totalPoints: 207, diff --git a/packages/shared/src/components/PlatformMudPointWalletEntry.tsx b/packages/shared/src/components/PlatformMudPointWalletEntry/index.tsx similarity index 96% rename from packages/shared/src/components/PlatformMudPointWalletEntry.tsx rename to packages/shared/src/components/PlatformMudPointWalletEntry/index.tsx index 57190b210..f8610977f 100644 --- a/packages/shared/src/components/PlatformMudPointWalletEntry.tsx +++ b/packages/shared/src/components/PlatformMudPointWalletEntry/index.tsx @@ -8,9 +8,9 @@ import { useState, } from 'react'; -import type { ProfileMudPointBalance } from '../contracts/runtime'; -import MUD_POINT_ICON_SRC from '../icons/topbar-wallet.png'; -import { formatMudPointCount } from '../utils/format'; +import type { ProfileMudPointBalance } from '../../contracts/runtime'; +import MUD_POINT_ICON_SRC from '../../icons/topbar-wallet.png'; +import { formatMudPointCount } from '../../utils/format'; export type PlatformMudPointWalletEntryProps = { balance: number | null; @@ -56,6 +56,7 @@ export function PlatformMudPointWalletEntry({ balance, breakdown, isLoading = false, + error = null, variant = 'desktop', className, onRequestDetails, @@ -245,7 +246,7 @@ export function PlatformMudPointWalletEntry({ ) : (
- {isLoading ? '余额读取中' : '余额明细暂不可用'} + {isLoading ? '余额读取中' : error || '余额明细暂不可用'}
)}