-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Issue# 2260] refactor search error page for maintainability (#2434)
* created a layout for the search route * created a SearchResult component to abstract away from page component * updated the error page to be up to date with these changes
- Loading branch information
1 parent
6403a9e
commit ffaaa27
Showing
8 changed files
with
241 additions
and
227 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { SEARCH_CRUMBS } from "src/constants/breadcrumbs"; | ||
|
||
import { useTranslations } from "next-intl"; | ||
import { unstable_setRequestLocale } from "next-intl/server"; | ||
|
||
import BetaAlert from "src/components/BetaAlert"; | ||
import Breadcrumbs from "src/components/Breadcrumbs"; | ||
import PageSEO from "src/components/PageSEO"; | ||
import SearchCallToAction from "src/components/search/SearchCallToAction"; | ||
|
||
export default function SearchLayout({ | ||
children, | ||
}: { | ||
children: React.ReactNode; | ||
}) { | ||
unstable_setRequestLocale("en"); | ||
const t = useTranslations("Search"); | ||
return ( | ||
<> | ||
<PageSEO title={t("title")} description={t("meta_description")} /> | ||
<BetaAlert /> | ||
<Breadcrumbs breadcrumbList={SEARCH_CRUMBS} /> | ||
<SearchCallToAction /> | ||
{children} | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.