From 056772d2d9fe3c86279e35d821ee595e484e0284 Mon Sep 17 00:00:00 2001 From: Cecilia Sanare Date: Wed, 26 Jun 2024 21:57:47 -0500 Subject: [PATCH] fix: erase search param when empty --- src/pages/apps/Layout.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/pages/apps/Layout.tsx b/src/pages/apps/Layout.tsx index da847d7..95317c2 100644 --- a/src/pages/apps/Layout.tsx +++ b/src/pages/apps/Layout.tsx @@ -14,9 +14,11 @@ export const Component: FC = () => { onChange={(value) => { navigate({ pathname: '/apps', - search: `?${createSearchParams({ - search: value, - })}`, + search: value + ? `?${createSearchParams({ + search: value, + })}` + : '', }); setSearch(value); }}