The admin-dashboard.loader file was refactored to use a newly created AdminDashboardService. This service encapsulates the logic for fetching dashboard data. Translations related to account settings, privacy policy, terms of service, and cookie policy were updated for better readability. Changes also include minor reorganizing of code files for clearer structure.
31 lines
754 B
TypeScript
31 lines
754 B
TypeScript
import { PageBody } from '@kit/ui/page';
|
|
import { Trans } from '@kit/ui/trans';
|
|
|
|
import { UserAccountHeader } from '~/(dashboard)/home/(user)/_components/user-account-header';
|
|
import { createI18nServerInstance } from '~/lib/i18n/i18n.server';
|
|
import { withI18n } from '~/lib/i18n/with-i18n';
|
|
|
|
export const generateMetadata = async () => {
|
|
const i18n = await createI18nServerInstance();
|
|
const title = i18n.t('account:homePage');
|
|
|
|
return {
|
|
title,
|
|
};
|
|
};
|
|
|
|
function UserHomePage() {
|
|
return (
|
|
<>
|
|
<UserAccountHeader
|
|
title={<Trans i18nKey={'common:homeTabLabel'} />}
|
|
description={<Trans i18nKey={'common:homeTabDescription'} />}
|
|
/>
|
|
|
|
<PageBody></PageBody>
|
|
</>
|
|
);
|
|
}
|
|
|
|
export default withI18n(UserHomePage);
|