Skip to content

Commit

Permalink
feat(core): add missing metadata in account home page (bigcommerce#1373)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgemoya authored Sep 16, 2024
1 parent 1f76f61 commit 971033f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/heavy-toes-own.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@bigcommerce/catalyst-core": patch
---

Add missing metadata in account settings page.
9 changes: 9 additions & 0 deletions core/app/[locale]/(default)/account/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { BookUser, Settings } from 'lucide-react';
import { useTranslations } from 'next-intl';
import { getTranslations } from 'next-intl/server';
import { ReactNode } from 'react';

import { Link } from '~/components/link';
Expand Down Expand Up @@ -28,6 +29,14 @@ const AccountItem = ({ children, title, description, href }: AccountItem) => {
);
};

export async function generateMetadata() {
const t = await getTranslations('Account.Home');

return {
title: t('title'),
};
}

export default function Account() {
const t = useTranslations('Account.Home');

Expand Down
3 changes: 2 additions & 1 deletion core/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@
},
"Account": {
"Home": {
"heading": "My Account",
"title": "My account",
"heading": "My account",
"accountTabsLabel": "Account Tabs",
"orders": "Orders",
"messages": "Messages",
Expand Down

0 comments on commit 971033f

Please sign in to comment.