Skip to content

Commit a303a5a

Browse files
committed
fix: adjust margin and layout for PeriodSelector and avg packet loss display in NetworkChartClient
1 parent 18e3c74 commit a303a5a

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/components/NetworkChart.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,9 @@ export const NetworkChartClient = React.memo(function NetworkChart({
334334
{stats.maxDelay.toFixed(0)}
335335
</span>
336336
{avgPacketLoss !== null && (
337-
<span className="text-muted-foreground">
338-
{avgPacketLoss.toFixed(2)}% avg loss
337+
<span className="text-muted-foreground flex items-center gap-1">
338+
{avgPacketLoss.toFixed(2)}%
339+
<p className=" hidden sm:block">avg loss</p>
339340
</span>
340341
)}
341342
</div>
@@ -531,7 +532,7 @@ export const NetworkChartClient = React.memo(function NetworkChart({
531532

532533
return (
533534
<div className="flex flex-col gap-3">
534-
<div className="flex items-center gap-3 -mt-5 flex-wrap">
535+
<div className="flex items-center gap-3 sm:-mt-5 -mt-3 flex-wrap">
535536
<div className="flex items-center gap-1 rounded-full bg-muted dark:bg-muted/40 p-0.5 border border-border/60 dark:border-border">
536537
{TIME_RANGE_OPTIONS.map((option) => {
537538
const isLocked = !isLogin && option.value !== "1d";

src/components/ServerDetailChart.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ function PeriodSelector({
9696
];
9797

9898
return (
99-
<div className="flex gap-0.5 mb-3 flex-wrap -mt-5 p-0.5 bg-muted dark:bg-muted/40 rounded-full w-fit border border-border/60 dark:border-border">
99+
<div className="flex gap-0.5 mb-3 flex-wrap sm:-mt-5 -mt-3 p-0.5 bg-muted dark:bg-muted/40 rounded-full w-fit border border-border/60 dark:border-border">
100100
{periods.map((period) => {
101101
// Only realtime and 1d are available for non-logged-in users
102102
const isLocked =

0 commit comments

Comments
 (0)