Revert "Unify workspace dropdowns; Update layouts (#458)"

This reverts commit 4bc8448a1d.
This commit is contained in:
gbuomprisco
2026-03-11 14:47:47 +08:00
parent 4bc8448a1d
commit 4912e402a3
530 changed files with 11182 additions and 14382 deletions

View File

@@ -1,16 +1,10 @@
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 { getRootTheme } from '~/lib/root-theme';
import { createI18nServerInstance } from '~/lib/i18n/i18n.server';
import { withI18n } from '~/lib/i18n/with-i18n';
export const generateMetadata = async () => {
const t = await getTranslations('common');
const title = t('notFound');
const i18n = await createI18nServerInstance();
const title = i18n.t('common:notFound');
return {
title,
@@ -18,26 +12,15 @@ 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 (
<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>
<div className={'flex h-screen flex-1 flex-col'}>
<ErrorPageContent
statusCode={'common:pageNotFoundHeading'}
heading={'common:pageNotFound'}
subtitle={'common:pageNotFoundSubHeading'}
/>
</div>
);
};
export default NotFoundPage;
export default withI18n(NotFoundPage);