avoid too many duplicate requireUserInServerComponent requests for each page+layout
This commit is contained in:
@@ -17,7 +17,7 @@ export const generateMetadata = async () => {
|
||||
};
|
||||
|
||||
async function PersonalAccountSettingsPage() {
|
||||
const account = await loadCurrentUserAccount();
|
||||
const { account } = await loadCurrentUserAccount();
|
||||
return (
|
||||
<PageBody>
|
||||
<div className="mx-auto w-full bg-white p-6">
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
import { CardTitle } from '@kit/ui/card';
|
||||
import { LanguageSelector } from '@kit/ui/language-selector';
|
||||
import { Trans } from '@kit/ui/trans';
|
||||
|
||||
import { loadCurrentUserAccount } from '../../_lib/server/load-user-account';
|
||||
import AccountPreferencesForm from '../_components/account-preferences-form';
|
||||
import SettingsSectionHeader from '../_components/settings-section-header';
|
||||
|
||||
export default async function PreferencesPage() {
|
||||
const account = await loadCurrentUserAccount();
|
||||
const { account } = await loadCurrentUserAccount();
|
||||
|
||||
return (
|
||||
<div className="mx-auto w-full bg-white p-6">
|
||||
@@ -16,7 +12,6 @@ export default async function PreferencesPage() {
|
||||
titleKey="account:preferencesTabLabel"
|
||||
descriptionKey="account:preferencesTabDescription"
|
||||
/>
|
||||
|
||||
<AccountPreferencesForm account={account} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user