mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-09-30 15:17:43 -05:00
Fix GlobalSearch flickering wrong search when filter changed
This commit is contained in:
@@ -234,7 +234,9 @@ function GlobalSearchContent({
|
||||
);
|
||||
|
||||
const hasQuery = query.length >= 3;
|
||||
const results = hasQuery ? (fetcher.data?.results ?? []) : [];
|
||||
const fetchedType = fetcher.data?.type ?? null;
|
||||
const results =
|
||||
hasQuery && fetchedType === searchType ? (fetcher.data?.results ?? []) : [];
|
||||
|
||||
const weaponResults =
|
||||
searchType === "weapons" && hasQuery ? filterWeaponResults(query, t) : [];
|
||||
|
||||
Reference in New Issue
Block a user