chore: update
This commit is contained in:
@@ -2,17 +2,18 @@
|
||||
|
||||
import { ProductCard } from "@/components/molecules/cards";
|
||||
import { useCart } from "@/lib/cart-context";
|
||||
import { MOCK_PRODUCTS } from "@/lib/constants";
|
||||
|
||||
import type { ProductGridProps } from "./ProductGrid.types";
|
||||
import { useManager } from "@/lib/manager-context";
|
||||
|
||||
export default function ProductGrid({
|
||||
searchQuery = "",
|
||||
isSidebarOpen = false,
|
||||
}: ProductGridProps) {
|
||||
const { addToCart } = useCart();
|
||||
const { products } = useManager();
|
||||
|
||||
const filteredProducts = MOCK_PRODUCTS.filter((p) => {
|
||||
const filteredProducts = products.filter((p) => {
|
||||
const isAvailable = p.available !== false;
|
||||
const matchesSearch =
|
||||
searchQuery.trim() === "" ||
|
||||
|
||||
@@ -33,189 +33,6 @@ export const SOCIAL_LINKS: SocialLinks = {
|
||||
website: "/",
|
||||
};
|
||||
|
||||
// ===== MOCK PRODUCTS =====
|
||||
// Placeholder data – replace with real API calls when backend is ready
|
||||
export const MOCK_PRODUCTS: MenuItemEntity[] = [
|
||||
{
|
||||
id: "1",
|
||||
name: "Black Coffee",
|
||||
price: 25000,
|
||||
imageUrl: "/imgs/products/placeholder.jpg",
|
||||
description:
|
||||
"Traditional Vietnamese black coffee, rich and bold, brewed by hand with a phin filter.",
|
||||
available: true,
|
||||
},
|
||||
{
|
||||
id: "2",
|
||||
name: "Milk Coffee",
|
||||
price: 30000,
|
||||
imageUrl: "/imgs/products/placeholder.jpg",
|
||||
description:
|
||||
"Aromatic condensed milk coffee, rich and creamy — a perfect blend of strong coffee and sweet condensed milk.",
|
||||
available: true,
|
||||
},
|
||||
{
|
||||
id: "3",
|
||||
name: "White Coffee",
|
||||
|
||||
price: 32000,
|
||||
imageUrl: "/imgs/products/placeholder.jpg",
|
||||
description:
|
||||
"Light and mild, with less coffee and more milk — perfect for those just starting to enjoy coffee.",
|
||||
available: true,
|
||||
},
|
||||
{
|
||||
id: "4",
|
||||
name: "Egg Coffee",
|
||||
|
||||
price: 45000,
|
||||
imageUrl: "/imgs/products/placeholder.jpg",
|
||||
description:
|
||||
"A Hanoi specialty — smooth, velvety egg cream layered over a bold coffee base.",
|
||||
available: true,
|
||||
},
|
||||
{
|
||||
id: "5",
|
||||
name: "Peach Orange Lemongrass Tea",
|
||||
|
||||
price: 35000,
|
||||
imageUrl: "/imgs/products/placeholder.jpg",
|
||||
description:
|
||||
"Fragrant peach tea with fresh orange and lemongrass — refreshing and wonderfully cooling.",
|
||||
available: true,
|
||||
},
|
||||
{
|
||||
id: "6",
|
||||
name: "Matcha Green Tea",
|
||||
|
||||
price: 40000,
|
||||
imageUrl: "/imgs/products/placeholder.jpg",
|
||||
description:
|
||||
"Pure Japanese matcha with a signature light bitterness — aromatic, refreshing, and nutritious.",
|
||||
available: true,
|
||||
},
|
||||
{
|
||||
id: "7",
|
||||
name: "Lychee Jasmine Tea",
|
||||
|
||||
price: 38000,
|
||||
imageUrl: "/imgs/products/placeholder.jpg",
|
||||
description:
|
||||
"Sweet lychee tea delicately infused with jasmine blossom — a calming and soulful sip.",
|
||||
available: true,
|
||||
},
|
||||
{
|
||||
id: "8",
|
||||
name: "Yogurt with Tapioca Pearls",
|
||||
|
||||
price: 38000,
|
||||
imageUrl: "/imgs/products/placeholder.jpg",
|
||||
description:
|
||||
"Smooth, creamy yogurt paired with chewy black tapioca pearls — a perfectly balanced sweet and tangy treat.",
|
||||
available: true,
|
||||
},
|
||||
{
|
||||
id: "9",
|
||||
name: "Strawberry Yogurt",
|
||||
|
||||
price: 40000,
|
||||
imageUrl: "/imgs/products/placeholder.jpg",
|
||||
description:
|
||||
"Chilled yogurt with fresh sweet-tart strawberries, packed with vitamins and minerals.",
|
||||
available: true,
|
||||
},
|
||||
{
|
||||
id: "10",
|
||||
name: "Fresh Orange Juice",
|
||||
|
||||
price: 35000,
|
||||
imageUrl: "/imgs/products/placeholder.jpg",
|
||||
description:
|
||||
"100% freshly squeezed orange juice, rich in vitamin C and great for your health.",
|
||||
available: true,
|
||||
},
|
||||
{
|
||||
id: "11",
|
||||
name: "Watermelon Juice",
|
||||
|
||||
price: 30000,
|
||||
imageUrl: "/imgs/products/placeholder.jpg",
|
||||
description:
|
||||
"Ice-cold watermelon juice — instantly refreshing on hot summer days.",
|
||||
available: true,
|
||||
},
|
||||
{
|
||||
id: "12",
|
||||
name: "Caramel Latte",
|
||||
|
||||
price: 45000,
|
||||
imageUrl: "/imgs/products/placeholder.jpg",
|
||||
description:
|
||||
"Sweet and indulgent caramel latte with a velvety milk foam topping and a drizzle of caramel sauce.",
|
||||
available: true,
|
||||
},
|
||||
{
|
||||
id: "13",
|
||||
name: "Vanilla Latte",
|
||||
|
||||
price: 45000,
|
||||
imageUrl: "/imgs/products/placeholder.jpg",
|
||||
description:
|
||||
"Smooth and gentle vanilla latte with a delicate natural vanilla fragrance.",
|
||||
available: true,
|
||||
},
|
||||
{
|
||||
id: "14",
|
||||
name: "Toasted Butter Bread",
|
||||
|
||||
price: 20000,
|
||||
imageUrl: "/imgs/products/placeholder.jpg",
|
||||
description:
|
||||
"Crispy toasted bread spread with fragrant butter and strawberry jam — the perfect coffee companion.",
|
||||
available: true,
|
||||
},
|
||||
{
|
||||
id: "15",
|
||||
name: "Caramel Flan",
|
||||
|
||||
price: 25000,
|
||||
imageUrl: "/imgs/products/placeholder.jpg",
|
||||
description:
|
||||
"Silky smooth flan with a golden caramel topping that melts in your mouth.",
|
||||
available: true,
|
||||
},
|
||||
{
|
||||
id: "16",
|
||||
name: "Black Tapioca Pearls",
|
||||
|
||||
price: 10000,
|
||||
imageUrl: "/imgs/products/placeholder.jpg",
|
||||
description:
|
||||
"Chewy black tapioca pearls — add them to any drink for extra flavor and texture.",
|
||||
available: true,
|
||||
},
|
||||
{
|
||||
id: "17",
|
||||
name: "Coffee Jelly",
|
||||
|
||||
price: 10000,
|
||||
imageUrl: "/imgs/products/placeholder.jpg",
|
||||
description:
|
||||
"Cool coffee jelly that adds a distinctive flavor boost to your drink.",
|
||||
available: true,
|
||||
},
|
||||
{
|
||||
id: "18",
|
||||
name: "White Tapioca Pearls",
|
||||
|
||||
price: 10000,
|
||||
imageUrl: "/imgs/products/placeholder.jpg",
|
||||
description:
|
||||
"Chewy white tapioca pearls — add them to any drink for extra flavor and texture.",
|
||||
available: true,
|
||||
},
|
||||
];
|
||||
|
||||
// ===== MOCK SHOPS (for Feed page) =====
|
||||
export const MOCK_SHOPS: Shop[] = [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user