import { basicLayoutResponse } from '/lib/utils/layout.tsx'; import { html } from '/public/ts/utils/misc.ts'; import page, { RequestHandlerParams } from '/lib/page.ts'; import { User } from '/lib/types.ts'; const titlePrefix = '404 - Page not found'; function get({ request, match, user, session, isRunningLocally }: RequestHandlerParams) { const htmlContent = defaultHtmlContent(user); return basicLayoutResponse(htmlContent, { currentPath: match?.pathname.input || '/', titlePrefix, match, request, user, session, isRunningLocally, }); } function defaultHtmlContent(user?: User | null) { const htmlContent = html`
${!user ? ( html`

404 - Page not found

` ) : ''}

The page you were looking for doesn't exist.

Go back home
`; return htmlContent; } export default page({ get, accessMode: 'public', });