Procházet zdrojové kódy

fix(dashboard): Update Money component to use 'currency' prop (#3644)

Sarif Mia před 6 měsíci
rodič
revize
aa517a6ba1

+ 2 - 2
packages/dashboard/src/app/routes/_authenticated/_customers/components/customer-order-table.tsx

@@ -40,7 +40,7 @@ export function CustomerOrderTable({ customerId }: Readonly<CustomerOrderTablePr
                     cell: ({ cell, row }) => {
                         const value = cell.getValue();
                         const currencyCode = row.original.currencyCode;
-                        return <Money value={value} currencyCode={currencyCode} />;
+                        return <Money value={value} currency={currencyCode} />;
                     },
                 },
                 totalWithTax: {
@@ -48,7 +48,7 @@ export function CustomerOrderTable({ customerId }: Readonly<CustomerOrderTablePr
                     cell: ({ cell, row }) => {
                         const value = cell.getValue();
                         const currencyCode = row.original.currencyCode;
-                        return <Money value={value} currencyCode={currencyCode} />;
+                        return <Money value={value} currency={currencyCode} />;
                     },
                 },
                 state: {

+ 2 - 2
packages/dashboard/src/app/routes/_authenticated/_orders/components/money-gross-net.tsx

@@ -10,10 +10,10 @@ export function MoneyGrossNet({ priceWithTax, price, currencyCode }: Readonly<Mo
     return (
         <div className="flex flex-col gap-1">
             <div>
-                <Money value={priceWithTax} currencyCode={currencyCode} />
+                <Money value={priceWithTax} currency={currencyCode} />
             </div>
             <div className="text-xs text-muted-foreground">
-                <Money value={price} currencyCode={currencyCode} />
+                <Money value={price} currency={currencyCode} />
             </div>
         </div>
     );

+ 1 - 1
packages/dashboard/src/app/routes/_authenticated/_orders/components/shipping-method-selector.tsx

@@ -48,7 +48,7 @@ export function ShippingMethodSelector({
                                     <span className="text-sm font-medium">
                                         <Trans>Price</Trans>
                                     </span>
-                                    <Money value={method.priceWithTax} currencyCode={currencyCode} />
+                                    <Money value={method.priceWithTax} currency={currencyCode} />
                                 </div>
                             </div>
                         </CardContent>

+ 2 - 2
packages/dashboard/src/app/routes/_authenticated/_orders/orders.tsx

@@ -61,7 +61,7 @@ function OrderListPage() {
                     cell: ({ cell, row }) => {
                         const value = cell.getValue();
                         const currencyCode = row.original.currencyCode;
-                        return <Money value={value} currencyCode={currencyCode} />;
+                        return <Money value={value} currency={currencyCode} />;
                     },
                 },
                 totalWithTax: {
@@ -69,7 +69,7 @@ function OrderListPage() {
                     cell: ({ cell, row }) => {
                         const value = cell.getValue();
                         const currencyCode = row.original.currencyCode;
-                        return <Money value={value} currencyCode={currencyCode} />;
+                        return <Money value={value} currency={currencyCode} />;
                     },
                 },
                 state: {