// @refresh reload import { createHandler, StartServer } from '@solidjs/start/server'; import { defaultLocale, getHTMLTextDir, getLocaleFromPath } from 'intlayer'; import { getRequestEvent } from 'solid-js/web'; import { AlternateLinks } from '~/components/AlternateLinks'; export default createHandler(() => ( { // The document shell is rendered outside the Router, so the locale comes // from the request URL rather than from the router location. const url = getRequestEvent()?.request.url ?? '/'; const locale = getLocaleFromPath(url) ?? defaultLocale; return ( {assets}
{children}
{scripts} ); }} /> ));