File tree Expand file tree Collapse file tree 3 files changed +12
-12
lines changed
app/[countryCode]/(checkout)/checkout
modules/checkout/templates Expand file tree Collapse file tree 3 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ export default async function Checkout() {
4747 < Wrapper cart = { cart } >
4848 < CheckoutForm />
4949 </ Wrapper >
50- < CheckoutSummary />
50+ < CheckoutSummary cart = { cart } />
5151 </ div >
5252 )
5353}
Original file line number Diff line number Diff line change 1+ "use server"
2+
13import {
24 createPaymentSessions ,
35 getCustomer ,
Original file line number Diff line number Diff line change 1+ "use client"
2+
13import { Heading } from "@medusajs/ui"
24
3- import { getScopedI18n } from "../../../../locales/server "
5+ import { useScopedI18n } from "../../../../locales/client "
46
57import ItemsPreviewTemplate from "@modules/cart/templates/preview"
68import DiscountCode from "@modules/checkout/components/discount-code"
79import CartTotals from "@modules/common/components/cart-totals"
810import Divider from "@modules/common/components/divider"
9- import { cookies } from "next/headers"
10- import { getCart } from "@lib/data"
11-
12- const CheckoutSummary = async ( ) => {
13- const t = await getScopedI18n ( "checkout" )
14- const cartId = cookies ( ) . get ( "_medusa_cart_id" ) ?. value
11+ import { Cart } from "medusa-react"
1512
16- if ( ! cartId ) {
17- return null
18- }
13+ type CheckoutSummaryProps = {
14+ cart : Omit < Cart , "refundable_amount" | "refunded_total" >
15+ }
1916
20- const cart = await getCart ( cartId ) . then ( ( cart ) => cart )
17+ const CheckoutSummary : React . FC < CheckoutSummaryProps > = ( { cart } ) => {
18+ const t = useScopedI18n ( "checkout" )
2119
2220 if ( ! cart ) {
2321 return null
You can’t perform that action at this time.
0 commit comments