update payment details
This commit is contained in:
@@ -8,6 +8,8 @@ import { z } from 'zod'
|
||||
import valid from 'card-validator'
|
||||
|
||||
import { Currency } from '@repo/ui/components/currency'
|
||||
import { Kbd } from '@repo/ui/components/ui/kbd'
|
||||
import { Abbr } from '@repo/ui/components/abbr'
|
||||
import { Button } from '@repo/ui/components/ui/button'
|
||||
import { Separator } from '@repo/ui/components/ui/separator'
|
||||
import { Spinner } from '@repo/ui/components/ui/spinner'
|
||||
@@ -73,7 +75,7 @@ type ReviewProps = {
|
||||
|
||||
export function Review({ onSubmit }: ReviewProps) {
|
||||
const wizard = useWizard()
|
||||
const { items, summary, address } = useWizardStore()
|
||||
const { items, summary, address, coupon } = useWizardStore()
|
||||
const { subtotal, discount, interest_amount, total } = summary()
|
||||
const [loading, { set }] = useToggle()
|
||||
|
||||
@@ -127,8 +129,15 @@ export function Review({ onSubmit }: ReviewProps) {
|
||||
</TableRow>
|
||||
{/* Discount */}
|
||||
<TableRow>
|
||||
<TableCell className="text-right" colSpan={3}>
|
||||
Descontos
|
||||
<TableCell colSpan={3}>
|
||||
<span className="flex gap-1 justify-end">
|
||||
Descontos
|
||||
{coupon && (
|
||||
<Kbd>
|
||||
<Abbr maxLen={8}>{coupon.code}</Abbr>
|
||||
</Kbd>
|
||||
)}
|
||||
</span>
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
<Currency>{discount}</Currency>
|
||||
|
||||
Reference in New Issue
Block a user