generated from acdh-oeaw/template-app-next
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: separate search page instantsearch provider and layout
- Loading branch information
1 parent
e469b67
commit 8c3d17c
Showing
3 changed files
with
51 additions
and
114 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import type { ReactNode } from "react"; | ||
|
||
import { ThomasBernhardInstantSearchProvider } from "@/components/instantsearch/thomas-bernhard/thomasbernhard-instantsearchprovider"; | ||
|
||
interface SearchLayoutProps { | ||
children: ReactNode; | ||
} | ||
|
||
export default function SearchLayout(props: SearchLayoutProps): ReactNode { | ||
const { children } = props; | ||
|
||
return ( | ||
<ThomasBernhardInstantSearchProvider | ||
queryArgsToMenuFields={{ | ||
language: "language" as const, | ||
category: "contains.work.category" as const, | ||
work: "contains.work.short_title" as const, | ||
translator: "contains.translators.name" as const, | ||
}} | ||
> | ||
{children} | ||
</ThomasBernhardInstantSearchProvider> | ||
); | ||
} |
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 was deleted.
Oops, something went wrong.