mirror of
https://github.com/vercel/commerce.git
synced 2025-05-16 06:26:58 +00:00
prettier
This commit is contained in:
parent
27a839eb86
commit
79c6870267
@ -33,7 +33,7 @@ const inter = Inter({
|
|||||||
export default async function RootLayout({ children }: { children: ReactNode }) {
|
export default async function RootLayout({ children }: { children: ReactNode }) {
|
||||||
return (
|
return (
|
||||||
<html lang="en" className={inter.variable}>
|
<html lang="en" className={inter.variable}>
|
||||||
<body className="text-black bg-gray-50 selection:bg-teal-300 dark:bg-dark dark:text-white dark:selection:bg-fuchsia-600 dark:selection:text-white">
|
<body className="bg-gray-50 text-black selection:bg-teal-300 dark:bg-dark dark:text-white dark:selection:bg-fuchsia-600 dark:selection:text-white">
|
||||||
<Navbar />
|
<Navbar />
|
||||||
<Suspense>
|
<Suspense>
|
||||||
<main>{children}</main>
|
<main>{children}</main>
|
||||||
|
@ -10,8 +10,8 @@ export async function Carousel() {
|
|||||||
if (!products?.length) return null;
|
if (!products?.length) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="relative w-full pb-6 overflow-hidden">
|
<div className="relative w-full overflow-hidden pb-6">
|
||||||
<div className="flex space-x-6 animate-carousel">
|
<div className="flex animate-carousel space-x-6">
|
||||||
{[...products, ...products].map((product, i) => (
|
{[...products, ...products].map((product, i) => (
|
||||||
<Link
|
<Link
|
||||||
key={`${product.handle}${i}`}
|
key={`${product.handle}${i}`}
|
||||||
@ -21,18 +21,18 @@ export async function Carousel() {
|
|||||||
{product.featuredImage ? (
|
{product.featuredImage ? (
|
||||||
<Image
|
<Image
|
||||||
alt={product.title}
|
alt={product.title}
|
||||||
className="object-contain h-full"
|
className="h-full object-contain"
|
||||||
fill
|
fill
|
||||||
sizes="33vw"
|
sizes="33vw"
|
||||||
src={product.featuredImage.url}
|
src={product.featuredImage.url}
|
||||||
/>
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
<div className="absolute bottom-0 left-0 flex items-center p-1 mb-2 ml-2 text-black border rounded-full bg-white/80 backdrop-blur-md dark:border-gray-800 dark:bg-black/80 dark:text-white md:mb-8 md:ml-8">
|
<div className="absolute bottom-0 left-0 mb-2 ml-2 flex items-center rounded-full border bg-white/80 p-1 text-black backdrop-blur-md dark:border-gray-800 dark:bg-black/80 dark:text-white md:mb-8 md:ml-8">
|
||||||
<h3 data-testid="product-name" className="inline pl-2 mr-6 text-xs font-semibold">
|
<h3 data-testid="product-name" className="mr-6 inline pl-2 text-xs font-semibold">
|
||||||
{product.title}
|
{product.title}
|
||||||
</h3>
|
</h3>
|
||||||
<Price
|
<Price
|
||||||
className="flex-none p-2 text-xs font-semibold text-white bg-blue-600 rounded-full"
|
className="flex-none rounded-full bg-blue-600 p-2 text-xs font-semibold text-white"
|
||||||
amount={product.priceRange.maxVariantPrice.amount}
|
amount={product.priceRange.maxVariantPrice.amount}
|
||||||
currencyCode={product.priceRange.maxVariantPrice.currencyCode}
|
currencyCode={product.priceRange.maxVariantPrice.currencyCode}
|
||||||
/>
|
/>
|
||||||
|
@ -30,7 +30,7 @@ export function GridTileImage({
|
|||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{active !== undefined && active ? (
|
{active !== undefined && active ? (
|
||||||
<span className="absolute w-full h-full bg-white opacity-25"></span>
|
<span className="absolute h-full w-full bg-white opacity-25"></span>
|
||||||
) : null}
|
) : null}
|
||||||
{props.src ? (
|
{props.src ? (
|
||||||
<Image
|
<Image
|
||||||
@ -60,7 +60,7 @@ export function GridTileImage({
|
|||||||
{labels.title}
|
{labels.title}
|
||||||
</h3>
|
</h3>
|
||||||
<Price
|
<Price
|
||||||
className="flex-none p-2 text-sm font-semibold text-white bg-blue-600 rounded-full"
|
className="flex-none rounded-full bg-blue-600 p-2 text-sm font-semibold text-white"
|
||||||
amount={labels.amount}
|
amount={labels.amount}
|
||||||
currencyCode={labels.currencyCode}
|
currencyCode={labels.currencyCode}
|
||||||
/>
|
/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user