From 347dfdb34ea2e7396b8ed74a03deec9666f7d4a9 Mon Sep 17 00:00:00 2001 From: BigSimmo <87357024+BigSimmo@users.noreply.github.com> Date: Fri, 24 Jul 2026 14:55:20 +0800 Subject: [PATCH] fix: use browser history for header back arrow --- .../global-search-shell.tsx | 31 +------------------ 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/src/components/clinical-dashboard/global-search-shell.tsx b/src/components/clinical-dashboard/global-search-shell.tsx index 261719ceb..737e27a7a 100644 --- a/src/components/clinical-dashboard/global-search-shell.tsx +++ b/src/components/clinical-dashboard/global-search-shell.tsx @@ -677,36 +677,7 @@ function GlobalStandaloneSearchShellClient({ ? "back" : "menu" } - onMobileBack={() => { - if (isInfoPage) { - if (pathname.startsWith("/services/")) { - router.push("/services"); - } else if (pathname.startsWith("/forms/")) { - router.push("/forms"); - } else if (pathname.startsWith("/medications/")) { - router.push("/?mode=prescribing"); - } else if (pathname.startsWith("/differentials/")) { - router.push("/differentials"); - } else if (pathname.startsWith("/dsm/")) { - router.push("/dsm"); - } else if (pathname.startsWith("/specifiers/")) { - router.push("/specifiers"); - } else if (pathname.startsWith("/formulation/")) { - router.push("/formulation"); - } else if (pathname.startsWith("/therapy-compass/")) { - router.push("/therapy-compass"); - } else if (pathname.startsWith("/factsheets/")) { - router.push("/factsheets"); - } else if (pathname.startsWith("/documents/")) { - router.push("/documents/search"); - } else { - router.back(); - } - } else { - setQuery(""); - navigateToMode(searchMode, { focus: true }); - } - }} + onMobileBack={() => router.back()} queryModeOptions={mockupQueryModeOptions} queryInputRef={inputRef} recentQueries={recentQueries}