From 15238ab5be580a159882a234c31a9fa85c18126e Mon Sep 17 00:00:00 2001 From: Usman Baig Date: Mon, 19 Jan 2026 15:14:21 +0100 Subject: [PATCH] fix: adjust minimum value for sampling rate input and improve label positioning for better UI clarity --- app/sites/[id]/settings/page.tsx | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/app/sites/[id]/settings/page.tsx b/app/sites/[id]/settings/page.tsx index 12983bf..e4e0881 100644 --- a/app/sites/[id]/settings/page.tsx +++ b/app/sites/[id]/settings/page.tsx @@ -932,7 +932,7 @@ export default function SiteSettingsPage() { = 0 ? i : SAMPLING_RATE_OPTIONS.length - 1 })()} - onChange={(e) => + onChange={(e) => { + const v = parseInt(e.target.value, 10) + const i = Math.max(0, Math.min(SAMPLING_RATE_OPTIONS.length - 1, v)) setFormData({ ...formData, - replay_sampling_rate: SAMPLING_RATE_OPTIONS[parseInt(e.target.value, 10)], + replay_sampling_rate: SAMPLING_RATE_OPTIONS[i], }) - } + }} className="w-full h-2 bg-neutral-200 dark:bg-neutral-700 rounded-lg appearance-none cursor-pointer accent-brand-orange" /> @@ -953,9 +955,15 @@ export default function SiteSettingsPage() { -
+
{SAMPLING_RATE_OPTIONS.map((pct) => ( - {pct}% + + {pct}% + ))}