Unify workspace dropdowns; Update layouts (#458)

Unified Account and Workspace drop-downs; Layout updates, now header lives within the PageBody component; Sidebars now use floating variant
This commit is contained in:
Giancarlo Buomprisco
2026-03-11 14:45:42 +08:00
committed by GitHub
parent ca585e09be
commit 4bc8448a1d
530 changed files with 14398 additions and 11198 deletions

View File

@@ -1,10 +1,16 @@
import { cookies } from 'next/headers';
import { getMessages, getTranslations } from 'next-intl/server';
import { routing } from '@kit/i18n';
import { I18nClientProvider } from '@kit/i18n/provider';
import { ErrorPageContent } from '~/components/error-page-content';
import { createI18nServerInstance } from '~/lib/i18n/i18n.server';
import { withI18n } from '~/lib/i18n/with-i18n';
import { getRootTheme } from '~/lib/root-theme';
export const generateMetadata = async () => {
const i18n = await createI18nServerInstance();
const title = i18n.t('common:notFound');
const t = await getTranslations('common');
const title = t('notFound');
return {
title,
@@ -12,15 +18,26 @@ export const generateMetadata = async () => {
};
const NotFoundPage = async () => {
const theme = await getRootTheme();
const cookieStore = await cookies();
const locale = cookieStore.get('lang')?.value || routing.defaultLocale;
const messages = await getMessages({ locale });
return (
<div className={'flex h-screen flex-1 flex-col'}>
<ErrorPageContent
statusCode={'common:pageNotFoundHeading'}
heading={'common:pageNotFound'}
subtitle={'common:pageNotFoundSubHeading'}
/>
</div>
<html lang="en" className={theme}>
<body className="bg-background">
<div className={'flex h-screen flex-1 flex-col'}>
<I18nClientProvider locale={locale} messages={messages}>
<ErrorPageContent
statusCode={'common.pageNotFoundHeading'}
heading={'common.pageNotFound'}
subtitle={'common.pageNotFoundSubHeading'}
/>
</I18nClientProvider>
</div>
</body>
</html>
);
};
export default withI18n(NotFoundPage);
export default NotFoundPage;