From 86d95da3c65b159e29c0d9c0af2d534d2ae56c59 Mon Sep 17 00:00:00 2001 From: kudinDmitriyUp Date: Mon, 8 Jun 2026 12:00:37 +0000 Subject: [PATCH] Bob AI: Added an image to each FAQ item in the accordion. --- src/pages/HomePage/sections/Faq.tsx | 221 ++++++++++++++++++++++------ 1 file changed, 176 insertions(+), 45 deletions(-) diff --git a/src/pages/HomePage/sections/Faq.tsx b/src/pages/HomePage/sections/Faq.tsx index 02125ad..d8cd51d 100644 --- a/src/pages/HomePage/sections/Faq.tsx +++ b/src/pages/HomePage/sections/Faq.tsx @@ -1,50 +1,181 @@ -// AUTO-GENERATED by per-section-migrate. Edit freely — Bob will treat this -// file as the canonical source for the "faq" section. +/* eslint-disable */ +// @ts-nocheck — generated by catalog-eject; runtime-correct but TS strict-mode false-positives on inlined catalog body +import { useState } from "react"; +import Button from "@/components/ui/Button"; +import SelectorButton from "@/components/ui/SelectorButton"; +import ScrollReveal from "@/components/ui/ScrollReveal"; +import TextAnimation from "@/components/ui/TextAnimation"; +import Transition from "@/components/ui/Transition"; +import Accordion from "@/components/ui/Accordion"; +import ImageOrVideo from "@/components/ui/ImageOrVideo"; -import React from 'react'; -import FaqTabbedAccordion from '@/components/sections/faq/FaqTabbedAccordion'; -import SectionErrorBoundary from "@/components/ui/SectionErrorBoundary"; +const categories = [ + { + name: "Ordering & Delivery", + items: [ + { + question: "How do I place an online order?", + answer: "Simply navigate to our 'Order Now' section, select your desired items, choose pickup or delivery, and complete the checkout process. It's fast and easy!", + imageSrc: "https://picsum.photos/seed/1641414566/1200/800" + }, + { + question: "What are your delivery hours and areas?", + answer: "We offer delivery Tuesday to Saturday, from 9 AM to 5 PM, within a 10-mile radius of our bakery. Minimum order value may apply.", + imageSrc: "https://picsum.photos/seed/1453898156/1200/800" + }, + { + question: "Can I pick up my order in-store?", + answer: "Yes! Select 'Pickup' at checkout and choose a convenient time slot during our operating hours (8 AM - 6 PM, Tuesday to Saturday).", + imageSrc: "https://picsum.photos/seed/1876617433/1200/800" + } + ] + }, + { + name: "Products & Customization", + items: [ + { + question: "Do you offer gluten-free or vegan options?", + answer: "Yes, we have a selection of delicious gluten-free and vegan items. Please check our online menu or ask our staff for today's specials.", + imageSrc: "https://picsum.photos/seed/881220485/1200/800" + }, + { + question: "How do I order a custom cake?", + answer: "For custom cakes, please fill out our inquiry form or call us directly. We'll discuss your design, flavor preferences, and provide a personalized quote.", + imageSrc: "https://picsum.photos/seed/1225091836/1200/800" + }, + { + question: "Is your daily inventory updated online?", + answer: "While our full menu is online, daily specials and limited-time items are best confirmed by calling our store directly. We bake fresh every morning!", + imageSrc: "https://picsum.photos/seed/286713376/1200/800" + } + ] + }, + { + name: "Loyalty & Rewards", + items: [ + { + question: "How can I join your loyalty program?", + answer: "Sign up for our newsletter and create an account online to automatically join our loyalty program. Earn points with every purchase and enjoy exclusive discounts and offers!", + imageSrc: "https://picsum.photos/seed/509284976/1200/800" + }, + { + question: "What kind of rewards do you offer?", + answer: "Our loyalty program offers discounts, free treats, early access to new products, and special birthday surprises!", + imageSrc: "https://picsum.photos/seed/412388744/1200/800" + } + ] + } +]; -export default function FaqSection(): React.JSX.Element { - return ( -
- - - +type FaqItem = { + question: string; + answer: string; +}; + +type FaqCategory = { + name: string; + items: FaqItem[]; +}; + +interface FaqTabbedAccordionProps { + tag: string; + title: string; + description: string; + categories: FaqCategory[]; + cta?: { + name: string; + role: string; + buttonText: string; + buttonHref: string; + } & ({ imageSrc: string; videoSrc?: never } | { videoSrc: string; imageSrc?: never }); +} + +const FaqInline = () => { + const [activeCategory, setActiveCategory] = useState(categories[0]?.name || ""); + + const currentItems = categories.find((c) => c.name === activeCategory)?.items || []; + const accordionItems = currentItems.map((item) => ({ + title: item.question, + content: ( +
+

{item.answer}

+ {item.imageSrc && ( +
+ +
+ )}
+ ) + })); + + return ( +
+
+
+
+
+

{"Your Questions, Answered"}

+
+ + + + + + ({ value: c.name, label: c.name }))} + activeValue={activeCategory} + onValueChange={setActiveCategory} + className="mt-2 md:mt-3" + /> +
+ + + + + + + + {undefined && ( + <> +
+
+
+ +
+ {undefined.name} + {undefined.role} +
+
+
+ + )} +
+
+
+ ); +}; + +export default function FaqSection() { + return ( +
+ +
); } -- 2.49.1