diff --git a/app/components/layout/CommandPalette.module.css b/app/components/layout/GlobalSearch.module.css similarity index 100% rename from app/components/layout/CommandPalette.module.css rename to app/components/layout/GlobalSearch.module.css diff --git a/app/components/layout/CommandPalette.tsx b/app/components/layout/GlobalSearch.tsx similarity index 98% rename from app/components/layout/CommandPalette.tsx rename to app/components/layout/GlobalSearch.tsx index 6efda93bd..0ea3a9b73 100644 --- a/app/components/layout/CommandPalette.tsx +++ b/app/components/layout/GlobalSearch.tsx @@ -26,7 +26,7 @@ import { userPage, weaponCategoryUrl, } from "~/utils/urls"; -import styles from "./CommandPalette.module.css"; +import styles from "./GlobalSearch.module.css"; import { filterWeaponResults, getRecentWeapons, @@ -47,7 +47,7 @@ const SEARCH_TYPES = [ ] as const; type SearchType = (typeof SEARCH_TYPES)[number]; -const STORAGE_KEY = "command-palette-search-type"; +const STORAGE_KEY = "global-search-search-type"; function searchTypeIconPath(type: SearchType): string { if (type === "weapons") { @@ -75,7 +75,7 @@ function getInitialSearchType(): SearchType { return "weapons"; } -export function CommandPalette() { +export function GlobalSearch() { const { t } = useTranslation(["common"]); // TODO: use zod validated search params const [searchParams, setSearchParams] = useSearchParams(); @@ -137,7 +137,7 @@ export function CommandPalette() { - handleOpenChange(false)} initialSearchType={initialSearchType} /> @@ -148,7 +148,7 @@ export function CommandPalette() { ); } -function CommandPaletteContent({ +function GlobalSearchContent({ onClose, initialSearchType, }: { diff --git a/app/components/layout/TopRightButtons.tsx b/app/components/layout/TopRightButtons.tsx index 459933cf7..bfe63a10f 100644 --- a/app/components/layout/TopRightButtons.tsx +++ b/app/components/layout/TopRightButtons.tsx @@ -3,7 +3,7 @@ import { useTranslation } from "react-i18next"; import { SUPPORT_PAGE } from "~/utils/urls"; import { LinkButton, SendouButton } from "../elements/Button"; import { AnythingAdder } from "./AnythingAdder"; -import { CommandPalette } from "./CommandPalette"; +import { GlobalSearch } from "./GlobalSearch"; import { LogInButtonContainer } from "./LogInButtonContainer"; import styles from "./TopRightButtons.module.css"; @@ -36,7 +36,7 @@ export function TopRightButtons({
{showSearch ? (
- +
) : null}
diff --git a/app/components/layout/WeaponSearch.tsx b/app/components/layout/WeaponSearch.tsx index 73a3e1b36..75b7aead3 100644 --- a/app/components/layout/WeaponSearch.tsx +++ b/app/components/layout/WeaponSearch.tsx @@ -30,7 +30,7 @@ import { weaponBuildPopularPage, weaponBuildStatsPage, } from "~/utils/urls"; -import styles from "./CommandPalette.module.css"; +import styles from "./GlobalSearch.module.css"; const WEAPON_DESTINATIONS = [ "builds",