Merge version_4 into main #3

Merged
bender merged 1 commits from version_4 into main 2026-05-23 20:15:51 +00:00

View File

@@ -12,11 +12,12 @@ import NavbarStyleCentered from '@/components/navbar/NavbarStyleCentered/NavbarS
import PricingCardEight from '@/components/sections/pricing/PricingCardEight';
import ProductCardFour from '@/components/sections/product/ProductCardFour';
import TestimonialCardOne from '@/components/sections/testimonial/TestimonialCardOne';
import ProductCart from '@/components/ecommerce/cart/ProductCart';
export default function LandingPage() {
// Simulated Auth Context: In a real app, this would come from a Context/Hook
const [user] = useState({ role: 'admin' }); // Change to 'user' to test restricted view
const [user] = useState({ role: 'admin' });
const isAdmin = user?.role === 'admin' || user?.role === 'manager';
const [isCartOpen, setIsCartOpen] = useState(false);
return (
<ThemeProvider
@@ -35,26 +36,31 @@ export default function LandingPage() {
<div id="nav" data-section="nav">
<NavbarStyleCentered
navItems={[
{
name: "الرئيسية", id: "hero"},
{
name: "الأقسام", id: "categories"},
{
name: "العروض", id: "discounts"},
{
name: "حساب الدعم", id: "contact"},
{ name: "الرئيسية", id: "hero"},
{ name: "الأقسام", id: "categories"},
{ name: "العروض", id: "discounts"},
{ name: "حساب الدعم", id: "contact"},
{ name: "السلة", id: "cart", onClick: () => setIsCartOpen(true) }
]}
brandName="Sama Store"
/>
</div>
<ProductCart
isOpen={isCartOpen}
onClose={() => setIsCartOpen(false)}
total="5000 IQD"
items={[]}
title="سلة التسوق"
emptyMessage="سلتك فارغة حالياً. رسوم التوصيل: 5000 دينار عراقي."
/>
<div id="hero" data-section="hero">
<HeroCarouselLogo
logoText="Sama Store"
description="تجربة تسوق فاخرة تليق بك. اكتشف مجموعتنا المختارة بعناية من أرقى المنتجات العالمية."
buttons={[
{
text: "تسوق الآن", href: "#products"},
{ text: "تسوق الآن", href: "#products" },
...(isAdmin ? [{ text: "لوحة الإدارة", href: "#admin" }] : [])
]}
slides={[
@@ -95,8 +101,6 @@ export default function LandingPage() {
{ id: "p2", name: "هاتف ذكي", price: "٣٠٠٠ ريال", variant: "جوالات", imageSrc: "http://img.b2bpic.net/free-photo/new-cell-phone-white-background_58702-5163.jpg" },
{ id: "p3", name: "محفظة جلدية", price: "٢٥٠ ريال", variant: "إكسسوارات", imageSrc: "http://img.b2bpic.net/free-photo/fathers-day-composition-with-present-box_23-2147790827.jpg" },
{ id: "p4", name: "مجموعة عناية", price: "٤٠٠ ريال", variant: "تجميل", imageSrc: "http://img.b2bpic.net/free-photo/foundation-bottles-stands_23-2149511226.jpg" },
{ id: "p5", name: "ساعة ذكية", price: "٨٠٠ ريال", variant: "إلكترونيات", imageSrc: "http://img.b2bpic.net/free-photo/still-life-tech-device_23-2150722612.jpg" },
{ id: "p6", name: "باقة زهور", price: "٢٠٠ ريال", variant: "هدايا", imageSrc: "http://img.b2bpic.net/free-photo/three-hands-holding-black-basket-pink-roses-wall_114579-1504.jpg" },
]}
title="منتجات مميزة"
description="أحدث المنتجات التي تم اختيارها خصيصاً لذوقك الرفيع."
@@ -111,49 +115,12 @@ export default function LandingPage() {
plans={[
{ id: "offer1", badge: "توفير", price: "٥٠٪", subtitle: "تخفيض على قسم الإلكترونيات", buttons: [{ text: "تسوق العرض" }], features: ["شحن مجاني", "ضمان سنتين"] },
{ id: "offer2", badge: "توفير", price: "٣٠٪", subtitle: "تخفيض على الأزياء", buttons: [{ text: "تسوق العرض" }], features: ["استبدال سريع", "جودة عالية"] },
{ id: "offer3", badge: "توفير", price: "٢٠٪", subtitle: "تخفيض على مستلزمات المنزل", buttons: [{ text: "تسوق العرض" }], features: ["خدمة عملاء ٢٤/٧", "توصيل سريع"] },
]}
title="عروض حصرية"
description="خصومات كبرى لفترة محدودة على منتجات مختارة."
/>
</div>
{isAdmin && (
<div id="metrics" data-section="metrics">
<MetricCardTwo
animationType="slide-up"
textboxLayout="default"
gridVariant="uniform-all-items-equal"
useInvertedBackground={false}
metrics={[
{ id: "m1", value: "٥٠٠٠+", description: "عميل سعيد" },
{ id: "m2", value: "٢٥+", description: "قسم تسوق" },
{ id: "m3", value: "١٠٠٪", description: "ضمان الجودة" },
]}
title="لوحة تحكم الإدارة"
description="عرض إحصائيات النظام والتحكم في المحتوى."
/>
</div>
)}
<div id="testimonials" data-section="testimonials">
<TestimonialCardOne
animationType="slide-up"
textboxLayout="default"
gridVariant="uniform-all-items-equal"
useInvertedBackground={false}
testimonials={[
{ id: "t1", name: "سارة أحمد", role: "مصممة", company: "الرياض", rating: 5, imageSrc: "http://img.b2bpic.net/free-photo/beautiful-young-female-with-hair-bun-having-joyful-look-smiling-cheerfully-happy-with-some-positive-news_273609-9042.jpg" },
{ id: "t2", name: "محمد خالد", role: "مهندس", company: "جدة", rating: 5, imageSrc: "http://img.b2bpic.net/free-photo/portrait-woman-smiling-kitchen_107420-12357.jpg" },
{ id: "t3", name: "نورة علي", role: "مديرة", company: "دبي", rating: 5, imageSrc: "http://img.b2bpic.net/free-photo/studio-portrait-serious-bearded-male-dressed-suit_613910-14795.jpg" },
{ id: "t4", name: "عمر سعد", role: "مطور", company: "القاهرة", rating: 5, imageSrc: "http://img.b2bpic.net/free-photo/selfie-portrait-cute-brunette-girl-with-short-hair-sitting-table-gray-plaid-terrace-restaurant-she-wears-blue-shirt-looks-happy_197531-971.jpg" },
{ id: "t5", name: "ليلى حسن", role: "محامية", company: "الدمام", rating: 5, imageSrc: "http://img.b2bpic.net/free-photo/portrait-handsome-bearded-stylish-male-wearing-elegant-suit-dark-background_613910-11359.jpg" },
]}
title="آراء عملائنا"
description="ماذا يقول عملاؤنا عن تجربة التسوق في Sama Store؟"
/>
</div>
<div id="contact" data-section="contact">
<ContactCenter
useInvertedBackground={false}