Skip to content

Commit 2b16747

Browse files
BCzyzewskiclaude
andauthored
fix(mobile): usage chart legend wraps instead of pushing the end date off-screen (pingdotgg#18203)
Co-authored-by: Claude Opus 5.5 <[email protected]>
1 parent 6b3a49b commit 2b16747

1 file changed

Lines changed: 14 additions & 12 deletions

File tree

‎apps/mobile/src/features/usage/UsageRouteScreen.tsx‎

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -546,13 +546,20 @@ function ChartCard(props: {
546546
</View>
547547
)}
548548

549-
<View className="flex-row items-center justify-between">
550-
<Text className="text-xs text-foreground-tertiary">
551-
{props.isPast24Hours
552-
? formatHourShort(props.days[0] ?? "", props.timeZone)
553-
: formatDayShort(props.sinceDay)}
554-
</Text>
555-
<View className="flex-row items-center gap-4">
549+
<View className="gap-2">
550+
<View className="flex-row items-center justify-between">
551+
<Text className="text-xs text-foreground-tertiary">
552+
{props.isPast24Hours
553+
? formatHourShort(props.days[0] ?? "", props.timeZone)
554+
: formatDayShort(props.sinceDay)}
555+
</Text>
556+
<Text className="text-xs text-foreground-tertiary">
557+
{props.isPast24Hours
558+
? formatHourShort(props.days[props.days.length - 1] ?? "", props.timeZone)
559+
: formatDayShort(props.untilDay)}
560+
</Text>
561+
</View>
562+
<View className="flex-row flex-wrap items-center gap-x-4 gap-y-1">
556563
{merged.providers.map((provider) => (
557564
<View key={provider.provider} className="flex-row items-center gap-1.5">
558565
<View
@@ -565,11 +572,6 @@ function ChartCard(props: {
565572
</View>
566573
))}
567574
</View>
568-
<Text className="text-xs text-foreground-tertiary">
569-
{props.isPast24Hours
570-
? formatHourShort(props.days[props.days.length - 1] ?? "", props.timeZone)
571-
: formatDayShort(props.untilDay)}
572-
</Text>
573575
</View>
574576
</View>
575577
);

0 commit comments

Comments
 (0)