Skip to content

Commit 6685c0d

Browse files
committed
emergency-withdraw: stack vault timestamps on their own line
The timestamp cells still wrapped to two cramped lines in the narrow right column on mobile. Vault and sunset time rows now stack — label above, full-width value below — so the timestamp fits on one line.
1 parent 555b231 commit 6685c0d

1 file changed

Lines changed: 17 additions & 3 deletions

File tree

emergency-withdraw/src/App.tsx

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,13 +246,27 @@ function InfoRow({
246246
tone = 'default',
247247
mono = true,
248248
breakAll = true,
249+
block = false,
249250
}: {
250251
label: string
251252
value: ReactNode
252253
tone?: Tone
253254
mono?: boolean
254255
breakAll?: boolean
256+
block?: boolean
255257
}) {
258+
// `block` stacks label over value — used for wide values (timestamps)
259+
// that would otherwise wrap awkwardly in the right column on mobile.
260+
if (block) {
261+
return (
262+
<div className="text-sm">
263+
<div className="text-slate-400">{label}</div>
264+
<div className={`mt-0.5 break-words ${mono ? 'font-mono' : ''} ${TONE_TEXT[tone]}`}>
265+
{value}
266+
</div>
267+
</div>
268+
)
269+
}
256270
return (
257271
<div className="flex items-baseline justify-between gap-4 text-sm">
258272
<span className="text-slate-400 shrink-0">{label}</span>
@@ -827,12 +841,12 @@ export default function App() {
827841
<InfoRow
828842
label={t('vault.lastCompound')}
829843
value={fmtTime(vault.lastCompoundTime, t('vault.never'))}
830-
breakAll={false}
844+
block
831845
/>
832846
<InfoRow
833847
label={t('vault.lastRealloc')}
834848
value={fmtTime(vault.lastReallocTime, t('vault.never'))}
835-
breakAll={false}
849+
block
836850
/>
837851
</DataPanel>
838852

@@ -991,7 +1005,7 @@ export default function App() {
9911005
<InfoRow
9921006
label={t('sunset.lastActivity')}
9931007
value={fmtTime(sunset.lastActivityMs, t('vault.never'))}
994-
breakAll={false}
1008+
block
9951009
/>
9961010
<InfoRow
9971011
label={t('sunset.daysSince')}

0 commit comments

Comments
 (0)