1
0
Fork 0
freesewing/sites/dev/pages/search.mjs

60 lines
1.6 KiB
JavaScript
Raw Normal View History

2023-05-22 19:52:23 +02:00
// Dependencies
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
// Components
import { PageWrapper, ns as pageNs } from 'shared/components/wrappers/page.mjs'
2023-05-22 19:52:23 +02:00
import { Search } from 'site/components/search.mjs'
import { Popout } from 'shared/components/popout/index.mjs'
2023-08-28 19:26:20 +02:00
import { PageLink } from 'shared/components/link.mjs'
2023-07-15 11:54:32 +02:00
import { NavLinks, Breadcrumbs, MainSections } from 'shared/components/navigation/sitenav.mjs'
import {
BaseLayout,
BaseLayoutLeft,
BaseLayoutProse,
BaseLayoutRight,
} from 'shared/components/base-layout.mjs'
2023-05-22 19:52:23 +02:00
const namespaces = [...pageNs]
2023-07-21 10:27:15 +02:00
const SearchPage = ({ page }) => {
const title = 'Search'
2023-05-22 19:52:23 +02:00
2023-07-15 11:54:32 +02:00
const tip = (
<Popout tip compact>
The <PageLink href="/sitemap" txt="sitemap" /> can also be helpful to find things.
</Popout>
)
return (
2023-11-03 15:36:09 +01:00
<PageWrapper {...page} title="Search" intro="Use the FreeSewing.dev site search">
<BaseLayout>
<BaseLayoutLeft>
<MainSections />
<NavLinks />
</BaseLayoutLeft>
<BaseLayoutProse>
2023-07-15 11:54:32 +02:00
<div className="w-full">
<Breadcrumbs />
2023-07-15 11:54:32 +02:00
<h1 className="break-words searchme">{title}</h1>
<div className="block xl:hidden">{tip}</div>
</div>
<Search />
</BaseLayoutProse>
<BaseLayoutRight>{tip}</BaseLayoutRight>
</BaseLayout>
2023-07-15 11:54:32 +02:00
</PageWrapper>
)
}
export default SearchPage
2023-05-22 19:52:23 +02:00
export async function getStaticProps() {
return {
props: {
...(await serverSideTranslations('en', namespaces)),
2023-05-22 19:52:23 +02:00
page: {
path: ['search'],
},
},
}
}