-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
42 additions
and
31 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
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
File renamed without changes.
File renamed without changes.
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,29 @@ | ||
import { importTranslations } from '~/i18n' | ||
import RootLayout from './root.layout' | ||
import i18n from '~/i18n.config.mjs' | ||
import SearchButton from 'websites/components/SearchButton' | ||
import DocHeader from '~/components/DocHeader' | ||
import { createTranslation } from '~/i18n' | ||
import { headers } from 'next/headers' | ||
|
||
export default async function NotFound() { | ||
const headersList = headers() | ||
const domain = headersList.get('x-forwarded-proto') + '://' + headersList.get('host') | ||
const referer = headersList.get('referer') | ||
let locale = referer?.replace(domain, '')?.split('/')?.[1] | ||
locale = i18n.locales.find((eachLocale) => eachLocale === locale) || 'en' | ||
const $ = await createTranslation(locale) | ||
return ( | ||
<RootLayout bodyClassName='bg:base' locale={locale} translations={await importTranslations(locale)}> | ||
<DocHeader contained /> | ||
<div className="center-content flex flex:col min-h:100dvh pt:50 pt:60@md px:10x"> | ||
<h3 className='fg:accent font:18 ls:.01em mb:5x text:center'>404</h3> | ||
<h1 className='fg:strong font:32 font:48@sm font:extrabold lh:1.2 ls:-.4 mt:0 text:center'>{$('This page does not exist')}</h1> | ||
<div className='p:4x|2x'> | ||
<p className='text:18 fg:light'>{$('Sorry, the page cannot be found. Please try searching for other content.')}</p> | ||
<SearchButton className="rounded b:1|frame lh:3rem min-w:60x mt:10x mx:auto pointer-events:auto px:6x" /> | ||
</div> | ||
</div> | ||
</RootLayout> | ||
) | ||
} |
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
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