1
1
import { Metadata } from "next"
2
2
3
+ import { getI18n } from "../../../../../../locales/server"
4
+
3
5
import ProfilePhone from "@modules/account//components/profile-phone"
4
6
import ProfileBillingAddress from "@modules/account/components/profile-billing-address"
5
7
import ProfileEmail from "@modules/account/components/profile-email"
@@ -10,11 +12,15 @@ import { getCustomer, listRegions } from "@lib/data"
10
12
import { notFound } from "next/navigation"
11
13
12
14
export const metadata : Metadata = {
13
- title : "Profile " ,
14
- description : "View and edit your Medusa Store profile." ,
15
+ title : "page.profile.title " ,
16
+ description : "page. profile.desc " ,
15
17
}
16
18
17
19
export default async function Profile ( ) {
20
+ const t = await getI18n ( )
21
+ metadata . title = t ( "page.profile.title" )
22
+ metadata . description = t ( "page.profile.desc" )
23
+
18
24
const customer = await getCustomer ( )
19
25
const regions = await listRegions ( )
20
26
@@ -25,12 +31,8 @@ export default async function Profile() {
25
31
return (
26
32
< div className = "w-full" data-testid = "profile-page-wrapper" >
27
33
< div className = "mb-8 flex flex-col gap-y-4" >
28
- < h1 className = "text-2xl-semi" > Profile</ h1 >
29
- < p className = "text-base-regular" >
30
- View and update your profile information, including your name, email,
31
- and phone number. You can also update your billing address, or change
32
- your password.
33
- </ p >
34
+ < h1 className = "text-2xl-semi" > { metadata . title } </ h1 >
35
+ < p className = "text-base-regular" > { t ( "page.profile.details" ) } </ p >
34
36
</ div >
35
37
< div className = "flex flex-col gap-y-8 w-full" >
36
38
< ProfileName customer = { customer } />
0 commit comments