mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
Work with displaying content
This commit is contained in:
@@ -4,7 +4,7 @@ import clsx from 'clsx';
|
||||
import { useRouter, useSearchParams } from 'next/navigation';
|
||||
import { useEffect, useState, useTransition } from 'react';
|
||||
|
||||
import LoadingDots from 'components/loading-dots';
|
||||
import LoadingDots from 'components/ui/loading-dots';
|
||||
import { ProductVariant } from 'lib/shopify/types';
|
||||
|
||||
export function AddToCart({
|
||||
|
@@ -1,17 +1,19 @@
|
||||
const Price = ({
|
||||
amount,
|
||||
currencyCode = 'USD',
|
||||
currencyCode,
|
||||
...props
|
||||
}: {
|
||||
amount: string;
|
||||
currencyCode: string;
|
||||
currencyCode: string | 'SEK' | 'GPB';
|
||||
} & React.ComponentProps<'p'>) => (
|
||||
<p suppressHydrationWarning={true} {...props}>
|
||||
|
||||
{`${new Intl.NumberFormat(undefined, {
|
||||
style: 'currency',
|
||||
currency: currencyCode,
|
||||
currencyDisplay: 'narrowSymbol'
|
||||
}).format(parseFloat(amount))} ${currencyCode}`}
|
||||
|
||||
</p>
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user