41 lines
1012 B
TypeScript
41 lines
1012 B
TypeScript
import { Trans } from '@kit/ui/trans';
|
|
|
|
import { createI18nServerInstance } from '~/lib/i18n/i18n.server';
|
|
import { withI18n } from '~/lib/i18n/with-i18n';
|
|
|
|
// local imports
|
|
import { HomeLayoutPageHeader } from './_components/home-page-header';
|
|
import { use } from 'react';
|
|
import { loadUserWorkspace } from './_lib/server/load-user-workspace';
|
|
|
|
export const generateMetadata = async () => {
|
|
const i18n = await createI18nServerInstance();
|
|
const title = i18n.t('account:homePage');
|
|
|
|
return {
|
|
title,
|
|
};
|
|
};
|
|
|
|
function UserHomePage() {
|
|
const { tempVisibleAccounts } = use(loadUserWorkspace());
|
|
return (
|
|
<>
|
|
<HomeLayoutPageHeader
|
|
title={<Trans i18nKey={'common:routes.home'} />}
|
|
description={<Trans i18nKey={'common:homeTabDescription'} />}
|
|
/>
|
|
{tempVisibleAccounts.length && (
|
|
<>
|
|
Member of companies:
|
|
<pre>{JSON.stringify(tempVisibleAccounts, null, 2)}</pre>
|
|
</>
|
|
)}
|
|
|
|
|
|
</>
|
|
);
|
|
}
|
|
|
|
export default withI18n(UserHomePage);
|