File tree Expand file tree Collapse file tree 6 files changed +47
-176
lines changed Expand file tree Collapse file tree 6 files changed +47
-176
lines changed Original file line number Diff line number Diff line change 1
1
import medusaRequest from "@lib/medusa-fetch"
2
2
import OrderCompletedTemplate from "@modules/order/templates/order-completed-template"
3
3
import PageLayout from "app/page-layout"
4
+ import { Metadata } from "next"
4
5
5
6
type Props = {
6
7
params : { id : string }
7
8
}
8
9
10
+ export const metadata : Metadata = {
11
+ title : "Order Confirmed" ,
12
+ description : "You purchase was successful" ,
13
+ }
14
+
9
15
export default async function CollectionPage ( { params } : Props ) {
10
16
const { order } = await medusaRequest ( "GET" , `/orders/${ params . id } ` ) . then (
11
17
( res ) => res . body
12
18
)
13
19
14
- return (
15
- < PageLayout >
16
- < OrderCompletedTemplate order = { order } />
17
- </ PageLayout >
18
- )
20
+ return < OrderCompletedTemplate order = { order } />
19
21
}
Original file line number Diff line number Diff line change
1
+ import SkeletonOrderConfirmed from "@modules/skeletons/templates/skeleton-order-confirmed"
2
+
3
+ export default function Loading ( ) {
4
+ return < SkeletonOrderConfirmed />
5
+ }
Original file line number Diff line number Diff line change
1
+ import medusaRequest from "@lib/medusa-fetch"
2
+ import OrderCompletedTemplate from "@modules/order/templates/order-completed-template"
3
+ import { Metadata } from "next"
4
+
5
+ type Props = {
6
+ params : { id : string }
7
+ }
8
+
9
+ export async function generateMetadata ( { params } : Props ) : Promise < Metadata > {
10
+ const { order } = await medusaRequest ( "GET" , `/orders/${ params . id } ` ) . then (
11
+ ( res ) => res . body
12
+ )
13
+
14
+ return {
15
+ title : `Order #${ order . display_id } ` ,
16
+ description : `View your order` ,
17
+ }
18
+ }
19
+
20
+ export default async function CollectionPage ( { params } : Props ) {
21
+ const { order } = await medusaRequest ( "GET" , `/orders/${ params . id } ` ) . then (
22
+ ( res ) => res . body
23
+ )
24
+
25
+ return < OrderCompletedTemplate order = { order } />
26
+ }
Original file line number Diff line number Diff line change
1
+ import PageLayout from "app/page-layout"
2
+
3
+ export default function CollectionLayout ( {
4
+ children,
5
+ } : {
6
+ children : React . ReactNode
7
+ } ) {
8
+ return < PageLayout > { children } </ PageLayout >
9
+ }
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments