Skip to content

Commit

Permalink
fix(core): Add translation provider to No Search Results (#645)
Browse files Browse the repository at this point in the history
  • Loading branch information
christensenep committed Mar 13, 2024
1 parent a2ce3b5 commit ac57f18
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/breezy-spies-sleep.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@bigcommerce/catalyst-core": patch
---

Add intl provider to No Search Results page
10 changes: 6 additions & 4 deletions apps/core/app/[locale]/(default)/(faceted)/search/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ export default async function Search({ params: { locale }, searchParams }: Props
return (
<>
<h1 className="mb-3 text-4xl font-black lg:text-5xl">{t('heading')}</h1>
<SearchForm />
<NextIntlClientProvider locale={locale} messages={{ NotFound: messages.NotFound ?? {} }}>
<SearchForm />
</NextIntlClientProvider>
</>
);
}
Expand All @@ -45,9 +47,9 @@ export default async function Search({ params: { locale }, searchParams }: Props
return (
<div>
<h1 className="mb-3 text-4xl font-black lg:text-5xl">{t('heading')}</h1>

<SearchForm initialTerm={searchTerm} />

<NextIntlClientProvider locale={locale} messages={{ NotFound: messages.NotFound ?? {} }}>
<SearchForm initialTerm={searchTerm} />
</NextIntlClientProvider>
<p className="pv-6">
<em>{t('noResults')}</em>
</p>
Expand Down

0 comments on commit ac57f18

Please sign in to comment.