From 5bcfa88f48a86eec348e0ab7f37a09a015d4bc70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Sun, 25 Aug 2024 21:15:16 -0500 Subject: [PATCH] fix: persistent search --- src/app/tools/tankopedia/components/SearchBar.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/tools/tankopedia/components/SearchBar.tsx b/src/app/tools/tankopedia/components/SearchBar.tsx index c65f33f22..b7c4a2d2d 100644 --- a/src/app/tools/tankopedia/components/SearchBar.tsx +++ b/src/app/tools/tankopedia/components/SearchBar.tsx @@ -15,6 +15,7 @@ interface SearchBarProps { export function SearchBar({ topResult, onSelect }: SearchBarProps) { const tankFiltersStore = TankFilters.useStore(); + const lastSearch = tankFiltersStore.getState().search; const router = useRouter(); const input = useRef(null); const searching = TankFilters.use((state) => state.searching); @@ -58,6 +59,7 @@ export function SearchBar({ topResult, onSelect }: SearchBarProps) {