From 63602f266390781a3552a14eefa35455f19c92b6 Mon Sep 17 00:00:00 2001 From: Stephen Zhou <38493346+hyoban@users.noreply.github.com> Date: Sat, 30 Nov 2024 01:24:02 +0800 Subject: [PATCH] fix: use replace for discover form navigation --- .../pages/(main)/(layer)/(subview)/discover/index.tsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/apps/renderer/src/pages/(main)/(layer)/(subview)/discover/index.tsx b/apps/renderer/src/pages/(main)/(layer)/(subview)/discover/index.tsx index c8c8554560..042531d36c 100644 --- a/apps/renderer/src/pages/(main)/(layer)/(subview)/discover/index.tsx +++ b/apps/renderer/src/pages/(main)/(layer)/(subview)/discover/index.tsx @@ -81,10 +81,13 @@ export function Component() { { - setSearch((search) => { - search.set("type", val) - return new URLSearchParams(search) - }) + setSearch( + (search) => { + search.set("type", val) + return new URLSearchParams(search) + }, + { replace: true }, + ) }} className="max-w-full" >