Update src/app/page.tsx
This commit is contained in:
@@ -13,6 +13,33 @@ import FaqBase from '@/components/sections/faq/FaqBase';
|
|||||||
import ContactCenter from '@/components/sections/contact/ContactCenter';
|
import ContactCenter from '@/components/sections/contact/ContactCenter';
|
||||||
import FooterBase from '@/components/sections/footer/FooterBase';
|
import FooterBase from '@/components/sections/footer/FooterBase';
|
||||||
|
|
||||||
|
// New type imports for props
|
||||||
|
import type { HeroBillboardRotatedCarouselProps } from '@/components/sections/hero/HeroBillboardRotatedCarousel';
|
||||||
|
import type { ProductCardThreeProps } from '@/components/sections/product/ProductCardThree';
|
||||||
|
import type { TextSplitAboutProps } from '@/components/sections/about/TextSplitAbout';
|
||||||
|
import type { FeatureCardNineProps } from '@/components/sections/feature/FeatureCardNine';
|
||||||
|
import type { TestimonialCardTwelveProps } from '@/components/sections/testimonial/TestimonialCardTwelve';
|
||||||
|
import type { FaqBaseProps } from '@/components/sections/faq/FaqBase';
|
||||||
|
import type { ContactCenterProps } from '@/components/sections/contact/ContactCenter';
|
||||||
|
import type { FooterBaseProps } from '@/components/sections/footer/FooterBase';
|
||||||
|
|
||||||
|
// Type definitions for homeSections array elements
|
||||||
|
type SectionEntry<T extends React.ComponentType<any>> = {
|
||||||
|
id: string;
|
||||||
|
Component: T;
|
||||||
|
props: React.ComponentProps<T>;
|
||||||
|
};
|
||||||
|
|
||||||
|
type HomeSection =
|
||||||
|
| SectionEntry<typeof HeroBillboardRotatedCarousel>
|
||||||
|
| SectionEntry<typeof ProductCardThree>
|
||||||
|
| SectionEntry<typeof TextSplitAbout>
|
||||||
|
| SectionEntry<typeof FeatureCardNine>
|
||||||
|
| SectionEntry<typeof TestimonialCardTwelve>
|
||||||
|
| SectionEntry<typeof FaqBase>
|
||||||
|
| SectionEntry<typeof ContactCenter>
|
||||||
|
| SectionEntry<typeof FooterBase>;
|
||||||
|
|
||||||
const initialMenuProducts = [
|
const initialMenuProducts = [
|
||||||
{ id: "1", name: "Spicy Beef Karahi", price: "$18.99", imageSrc: "https://framerusercontent.com/images/kC11vL7j733D6t7vK0pD1o2X1Q.png", imageAlt: "Spicy Beef Karahi" },
|
{ id: "1", name: "Spicy Beef Karahi", price: "$18.99", imageSrc: "https://framerusercontent.com/images/kC11vL7j733D6t7vK0pD1o2X1Q.png", imageAlt: "Spicy Beef Karahi" },
|
||||||
{ id: "2", name: "Chicken Biryani", price: "$15.50", imageSrc: "https://framerusercontent.com/images/K1eTqN6Q4B4z0M8y5D2k2k7V7c.png", imageAlt: "Chicken Biryani" },
|
{ id: "2", name: "Chicken Biryani", price: "$15.50", imageSrc: "https://framerusercontent.com/images/K1eTqN6Q4B4z0M8y5D2k2k7V7c.png", imageAlt: "Chicken Biryani" },
|
||||||
@@ -22,7 +49,7 @@ const initialMenuProducts = [
|
|||||||
{ id: "6", name: "Nihari", price: "$16.25", imageSrc: "https://framerusercontent.com/images/V6W2x2k7V7cK1eTqN6Q4B4z0M8y5D2k.png", imageAlt: "Nihari" }
|
{ id: "6", name: "Nihari", price: "$16.25", imageSrc: "https://framerusercontent.com/images/V6W2x2k7V7cK1eTqN6Q4B4z0M8y5D2k.png", imageAlt: "Nihari" }
|
||||||
];
|
];
|
||||||
|
|
||||||
const homeSections = [
|
const homeSections: HomeSection[] = [
|
||||||
{
|
{
|
||||||
id: "hero", Component: HeroBillboardRotatedCarousel,
|
id: "hero", Component: HeroBillboardRotatedCarousel,
|
||||||
props: {
|
props: {
|
||||||
@@ -44,7 +71,8 @@ const homeSections = [
|
|||||||
{
|
{
|
||||||
id: "menu", Component: ProductCardThree,
|
id: "menu", Component: ProductCardThree,
|
||||||
props: {
|
props: {
|
||||||
title: "Our Signature Menu", description: "Discover a diverse array of authentic Pakistani dishes, expertly prepared to tantalize your taste buds. From rich curries to succulent kebabs, every meal is a journey.", tag: "Taste Tradition", gridVariant: "three-columns-all-equal-width", animationType: "entrance-slide", useInvertedBackground: false,
|
title: "Our Signature Menu", description: "Discover a diverse array of authentic Pakistani dishes, expertly prepared to tantalize your taste buds. From rich curries to succulent kebabs, every meal is a journey.", tag: "Taste Tradition", gridVariant: "three-columns-all-equal-width", animationType: "blur-reveal", // FIX: Changed from "entrance-slide" to a valid type for ProductCardThree
|
||||||
|
useInvertedBackground: false,
|
||||||
buttons: [{ text: "View Full Menu", href: "#" }]
|
buttons: [{ text: "View Full Menu", href: "#" }]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -62,7 +90,8 @@ const homeSections = [
|
|||||||
id: "features", Component: FeatureCardNine,
|
id: "features", Component: FeatureCardNine,
|
||||||
props: {
|
props: {
|
||||||
title: "How We Deliver Authenticity", description: "Our commitment to genuine Pakistani flavors is reflected in every step of our process, from sourcing ingredients to culinary craftsmanship.", tag: "Our Pillars", showStepNumbers: true,
|
title: "How We Deliver Authenticity", description: "Our commitment to genuine Pakistani flavors is reflected in every step of our process, from sourcing ingredients to culinary craftsmanship.", tag: "Our Pillars", showStepNumbers: true,
|
||||||
animationType: "entrance-slide", textboxLayout: "default", useInvertedBackground: true,
|
animationType: "blur-reveal", // FIX: Changed from "entrance-slide" to a valid type for FeatureCardNine
|
||||||
|
textboxLayout: "default", useInvertedBackground: true,
|
||||||
features: [
|
features: [
|
||||||
{
|
{
|
||||||
title: "Hand-Picked Spices", description: "We source the finest spices directly from local markets in Pakistan, ensuring unparalleled aroma and flavor in every dish.", phoneOne: { imageSrc: "https://framerusercontent.com/images/0g0U4pQWf64sC15vW2f2x4y3z1Q.png", imageAlt: "Hand-picked spices" },
|
title: "Hand-Picked Spices", description: "We source the finest spices directly from local markets in Pakistan, ensuring unparalleled aroma and flavor in every dish.", phoneOne: { imageSrc: "https://framerusercontent.com/images/0g0U4pQWf64sC15vW2f2x4y3z1Q.png", imageAlt: "Hand-picked spices" },
|
||||||
@@ -82,7 +111,8 @@ const homeSections = [
|
|||||||
{
|
{
|
||||||
id: "testimonials", Component: TestimonialCardTwelve,
|
id: "testimonials", Component: TestimonialCardTwelve,
|
||||||
props: {
|
props: {
|
||||||
cardTitle: "What Our Guests Say", cardTag: "Satisfied Palates", cardAnimation: "entrance-slide", useInvertedBackground: false,
|
cardTitle: "What Our Guests Say", cardTag: "Satisfied Palates", cardAnimation: "blur-reveal", // FIX: Changed from "entrance-slide" to a valid type for TestimonialCardTwelve
|
||||||
|
useInvertedBackground: false,
|
||||||
testimonials: [
|
testimonials: [
|
||||||
{ id: "1", name: "Aisha Khan", imageSrc: "https://framerusercontent.com/images/L9eTqN6Q4B4z0M8y5D2k2k7V7c.png", imageAlt: "Aisha Khan" },
|
{ id: "1", name: "Aisha Khan", imageSrc: "https://framerusercontent.com/images/L9eTqN6Q4B4z0M8y5D2k2k7V7c.png", imageAlt: "Aisha Khan" },
|
||||||
{ id: "2", name: "Omar Malik", imageSrc: "https://framerusercontent.com/images/K2x2k7V7cV6T4eR1N6Q4B4z0M8y5D.png", imageAlt: "Omar Malik" },
|
{ id: "2", name: "Omar Malik", imageSrc: "https://framerusercontent.com/images/K2x2k7V7cV6T4eR1N6Q4B4z0M8y5D.png", imageAlt: "Omar Malik" },
|
||||||
@@ -93,7 +123,8 @@ const homeSections = [
|
|||||||
{
|
{
|
||||||
id: "faq", Component: FaqBase,
|
id: "faq", Component: FaqBase,
|
||||||
props: {
|
props: {
|
||||||
title: "Frequently Asked Questions", description: "Find answers to common questions about our cafe, menu, and services.", tag: "Your Queries Answered", faqsAnimation: "entrance-slide", textboxLayout: "default", useInvertedBackground: true,
|
title: "Frequently Asked Questions", description: "Find answers to common questions about our cafe, menu, and services.", tag: "Your Queries Answered", faqsAnimation: "blur-reveal", // FIX: Changed from "entrance-slide" to a valid type for FaqBase
|
||||||
|
textboxLayout: "default", useInvertedBackground: true,
|
||||||
faqs: [
|
faqs: [
|
||||||
{
|
{
|
||||||
id: "1", title: "What are your most popular dishes?", content: "Our Chicken Biryani, Beef Karahi, and Mutton Korma are highly recommended by our regulars. Don't forget to try our freshly baked Naan!"
|
id: "1", title: "What are your most popular dishes?", content: "Our Chicken Biryani, Beef Karahi, and Mutton Korma are highly recommended by our regulars. Don't forget to try our freshly baked Naan!"
|
||||||
@@ -194,7 +225,7 @@ export default function Home() {
|
|||||||
if (section.id === "menu") {
|
if (section.id === "menu") {
|
||||||
return (
|
return (
|
||||||
<div key={index} id={section.id} data-section={section.id}>
|
<div key={index} id={section.id} data-section={section.id}>
|
||||||
<SectionComponent {...section.props} products={menuProducts} />
|
<SectionComponent {...section.props as ProductCardThreeProps} products={menuProducts} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user