mirror of
https://github.com/whekin/household-bot.git
synced 2026-04-01 02:44:02 +00:00
fix(miniapp): refresh billing state and clean up controls
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
import { Show } from 'solid-js'
|
||||
|
||||
import { cn } from '../../lib/cn'
|
||||
import { formatFriendlyDate } from '../../lib/dates'
|
||||
import { majorStringToMinor, sumMajorStrings } from '../../lib/money'
|
||||
import type { MiniAppDashboard } from '../../miniapp-api'
|
||||
import { MiniChip, StatCard } from '../ui'
|
||||
|
||||
type Props = {
|
||||
copy: Record<string, string | undefined>
|
||||
locale: 'en' | 'ru'
|
||||
dashboard: MiniAppDashboard
|
||||
member: MiniAppDashboard['members'][number]
|
||||
detail?: boolean
|
||||
@@ -123,7 +125,8 @@ export function MemberBalanceCard(props: Props) {
|
||||
<Show when={props.dashboard.rentFxEffectiveDate}>
|
||||
{(date) => (
|
||||
<MiniChip muted>
|
||||
{props.copy.fxEffectiveDateLabel ?? ''}: {date()}
|
||||
{props.copy.fxEffectiveDateLabel ?? ''}:{' '}
|
||||
{formatFriendlyDate(date(), props.locale)}
|
||||
</MiniChip>
|
||||
)}
|
||||
</Show>
|
||||
|
||||
@@ -124,3 +124,15 @@ export function XIcon(props: IconProps) {
|
||||
</svg>
|
||||
)
|
||||
}
|
||||
|
||||
export function TrashIcon(props: IconProps) {
|
||||
return (
|
||||
<svg {...iconProps(props)}>
|
||||
<path d="M4 7h16" />
|
||||
<path d="M10 11v6" />
|
||||
<path d="M14 11v6" />
|
||||
<path d="M6 7l1 13a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2l1-13" />
|
||||
<path d="M9 4h6l1 3H8l1-3Z" />
|
||||
</svg>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user