Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9e0035fd08 | |||
| 2f689a6359 | |||
| 0045974a4e | |||
| e755dfc777 | |||
| eafcfdc800 | |||
| c95aa9ebab | |||
| b04375fdc0 | |||
| 248de42a44 |
1386
src/app/layout.tsx
1386
src/app/layout.tsx
File diff suppressed because it is too large
Load Diff
@@ -11,7 +11,7 @@ html {
|
|||||||
body {
|
body {
|
||||||
background-color: var(--background);
|
background-color: var(--background);
|
||||||
color: var(--foreground);
|
color: var(--foreground);
|
||||||
font-family: var(--font-nunito), sans-serif;
|
font-family: var(--font-open-sans), sans-serif;
|
||||||
position: relative;
|
position: relative;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
overscroll-behavior: none;
|
overscroll-behavior: none;
|
||||||
@@ -24,5 +24,5 @@ h3,
|
|||||||
h4,
|
h4,
|
||||||
h5,
|
h5,
|
||||||
h6 {
|
h6 {
|
||||||
font-family: var(--font-nunito), sans-serif;
|
font-family: var(--font-inter), sans-serif;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,22 +3,22 @@
|
|||||||
/* --vw is set by ThemeProvider */
|
/* --vw is set by ThemeProvider */
|
||||||
|
|
||||||
/* --background: #f7f6f7;;
|
/* --background: #f7f6f7;;
|
||||||
--card: #ffffff;;
|
--card: #16213e;;
|
||||||
--foreground: #0c1325;;
|
--foreground: #e0e0e0;;
|
||||||
--primary-cta: #0798ff;;
|
--primary-cta: #0798ff;;
|
||||||
--secondary-cta: #ffffff;;
|
--secondary-cta: #1a1a2e;;
|
||||||
--accent: #93c7ff;;
|
--accent: #5a9fd4;;
|
||||||
--background-accent: #a8cde8;; */
|
--background-accent: #2d3e5f;; */
|
||||||
|
|
||||||
--background: #f7f6f7;;
|
--background: #1a1a2e;;
|
||||||
--card: #ffffff;;
|
--card: #16213e;;
|
||||||
--foreground: #0c1325;;
|
--foreground: #e0e0e0;;
|
||||||
--primary-cta: #0798ff;;
|
--primary-cta: #0798ff;;
|
||||||
--primary-cta-text: #f7f6f7;;
|
--primary-cta-text: #f7f6f7;;
|
||||||
--secondary-cta: #ffffff;;
|
--secondary-cta: #1a1a2e;;
|
||||||
--secondary-cta-text: #0c1325;;
|
--secondary-cta-text: #0c1325;;
|
||||||
--accent: #93c7ff;;
|
--accent: #5a9fd4;;
|
||||||
--background-accent: #a8cde8;;
|
--background-accent: #2d3e5f;;
|
||||||
|
|
||||||
/* text sizing - set by ThemeProvider */
|
/* text sizing - set by ThemeProvider */
|
||||||
/* --text-2xs: clamp(0.465rem, 0.62vw, 0.62rem);
|
/* --text-2xs: clamp(0.465rem, 0.62vw, 0.62rem);
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ import CardStack from "@/components/cardStack/CardStack";
|
|||||||
import ProductImage from "@/components/shared/ProductImage";
|
import ProductImage from "@/components/shared/ProductImage";
|
||||||
import QuantityButton from "@/components/shared/QuantityButton";
|
import QuantityButton from "@/components/shared/QuantityButton";
|
||||||
import Button from "@/components/button/Button";
|
import Button from "@/components/button/Button";
|
||||||
|
"use client";
|
||||||
|
|
||||||
import { useTheme } from "@/providers/themeProvider/ThemeProvider";
|
import { useTheme } from "@/providers/themeProvider/ThemeProvider";
|
||||||
import { useProducts } from "@/hooks/useProducts";
|
import { useProducts } from "@/hooks/useProducts";
|
||||||
import { getButtonProps } from "@/lib/buttonUtils";
|
import { getButtonProps } from "@/lib/buttonUtils";
|
||||||
@@ -75,6 +77,55 @@ interface ProductCardItemProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const ProductCardItem = memo(({
|
const ProductCardItem = memo(({
|
||||||
|
product,
|
||||||
|
shouldUseLightText,
|
||||||
|
isFromApi,
|
||||||
|
onBuyClick,
|
||||||
|
cardClassName,
|
||||||
|
imageClassName,
|
||||||
|
cardNameClassName,
|
||||||
|
quantityControlsClassName,
|
||||||
|
}: ProductCardItemProps) => {
|
||||||
|
return (
|
||||||
|
<div className={cls("flex flex-col gap-4", cardClassName)}>
|
||||||
|
<div className="relative w-full overflow-hidden rounded-lg bg-gray-100 dark:bg-gray-800">
|
||||||
|
<img
|
||||||
|
src={product.image}
|
||||||
|
alt={product.name}
|
||||||
|
className={cls(
|
||||||
|
"w-full h-full object-cover transition-transform duration-500 ease-out hover:scale-x-[-1]",
|
||||||
|
imageClassName
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="flex flex-col gap-2">
|
||||||
|
<h3 className={cls("font-semibold text-lg", cardNameClassName)}>
|
||||||
|
{product.name}
|
||||||
|
</h3>
|
||||||
|
<p className="text-sm text-gray-600 dark:text-gray-400">
|
||||||
|
{product.description}
|
||||||
|
</p>
|
||||||
|
<div className="flex items-center justify-between mt-2">
|
||||||
|
<span className="text-xl font-bold">
|
||||||
|
${product.price.toFixed(2)}
|
||||||
|
</span>
|
||||||
|
{onBuyClick && (
|
||||||
|
<button
|
||||||
|
onClick={() => onBuyClick(product.id, product.initialQuantity || 1)}
|
||||||
|
className="px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors"
|
||||||
|
>
|
||||||
|
Buy
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
ProductCardItem.displayName = "ProductCardItem";
|
||||||
|
|
||||||
|
const ProductCardThreeContent = memo(({
|
||||||
product,
|
product,
|
||||||
shouldUseLightText,
|
shouldUseLightText,
|
||||||
isFromApi,
|
isFromApi,
|
||||||
|
|||||||
Reference in New Issue
Block a user