Skip to content

Commit 96c2ed0

Browse files
jorgemoyaclaude
andcommitted
fix(core): use CurrencyCode type for cached search currency parameter
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent abe99f9 commit 96c2ed0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

core/components/header/_actions/search.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { getSessionCustomerAccessToken } from '~/auth';
1212
import { client } from '~/client';
1313
import { graphql } from '~/client/graphql';
1414
import { revalidate } from '~/client/revalidate-target';
15+
import { CurrencyCode } from '~/components/header/fragment';
1516
import { searchResultsTransformer } from '~/data-transformers/search-results-transformer';
1617
import { getPreferredCurrencyCode } from '~/lib/currency';
1718

@@ -87,7 +88,7 @@ export async function search(
8788
const locale = await getLocale();
8889

8990
const getCachedQuickSearchResults = unstable_cache(
90-
async (searchTerm: string, searchCurrencyCode?: string) => {
91+
async (searchTerm: string, searchCurrencyCode?: CurrencyCode) => {
9192
const response = await client.fetch({
9293
document: GetQuickSearchResultsQuery,
9394
variables: { filters: { searchTerm }, currencyCode: searchCurrencyCode },

0 commit comments

Comments
 (0)