diff --git a/src/app/about-antalya-restaurant/AboutContent.tsx b/src/app/about-antalya-restaurant/AboutContent.tsx
index 17e5cf0..df8408e 100644
--- a/src/app/about-antalya-restaurant/AboutContent.tsx
+++ b/src/app/about-antalya-restaurant/AboutContent.tsx
@@ -38,6 +38,17 @@ export default function AboutContent() {
const [loading, setLoading] = useState(true);
const [expandedReview, setExpandedReview] = useState(null);
const [swiperInstance, setSwiperInstance] = useState(null);
+ const [openFaqIndex, setOpenFaqIndex] = useState(0);
+
+ // Ensure first FAQ is open on mount with a small delay
+ useEffect(() => {
+ if (aboutFaqData.length > 0) {
+ const timer = setTimeout(() => {
+ setOpenFaqIndex(0);
+ }, 100);
+ return () => clearTimeout(timer);
+ }
+ }, []);
// Auto-collapse expanded review after 10 seconds and handle autoplay
useEffect(() => {
@@ -429,7 +440,13 @@ export default function AboutContent() {
{aboutFaqData.map((faq, index) => (
-
+ setOpenFaqIndex(openFaqIndex === index ? null : index)}
+ />
))}
@@ -488,14 +505,22 @@ export default function AboutContent() {
}
// FAQ Item Component
-function FaqItem({ question, answer }: { question: string; answer: string }) {
- const [isOpen, setIsOpen] = useState(false);
-
+function FaqItem({
+ question,
+ answer,
+ isOpen,
+ onToggle
+}: {
+ question: string;
+ answer: string;
+ isOpen: boolean;
+ onToggle: () => void;
+}) {
return (