1
1
import { Metadata } from "next"
2
2
3
+ import { getI18n } from "../../../../../../locales/server"
4
+
3
5
import OrderOverview from "@modules/account/components/order-overview"
4
6
import { listCustomerOrders } from "@lib/data"
5
7
import { notFound } from "next/navigation"
6
8
7
9
export const metadata : Metadata = {
8
- title : "Orders " ,
9
- description : "Overview of your previous orders." ,
10
+ title : "page.orders.title " ,
11
+ description : "page. orders.desc " ,
10
12
}
11
13
12
14
export default async function Orders ( ) {
15
+ const t = await getI18n ( )
16
+ metadata . title = t ( "page.orders.title" )
17
+ metadata . description = t ( "page.orders.desc" )
18
+
13
19
const orders = await listCustomerOrders ( )
14
20
15
21
if ( ! orders ) {
@@ -19,11 +25,8 @@ export default async function Orders() {
19
25
return (
20
26
< div className = "w-full" data-testid = "orders-page-wrapper" >
21
27
< div className = "mb-8 flex flex-col gap-y-4" >
22
- < h1 className = "text-2xl-semi" > Orders</ h1 >
23
- < p className = "text-base-regular" >
24
- View your previous orders and their status. You can also create
25
- returns or exchanges for your orders if needed.
26
- </ p >
28
+ < h1 className = "text-2xl-semi" > { t ( "page.orders.title" ) } </ h1 >
29
+ < p className = "text-base-regular" > { t ( "page.orders.details" ) } </ p >
27
30
</ div >
28
31
< div >
29
32
< OrderOverview orders = { orders } />
0 commit comments