@@ -2,7 +2,7 @@ import { faq } from '@/faq';
22import { notFound } from 'next/navigation' ;
33import { defaultLocale , getDictionary , localeNames } from '@/lib/i18n' ;
44import Link from 'next/link' ;
5- import { ArrowLeft , ChevronLeft , ChevronRight } from 'lucide-react' ;
5+ import { ArrowLeft } from 'lucide-react' ;
66import FAQCard from '@/components/faq/FAQCard' ;
77import { showFAQ } from '@/constants' ;
88
@@ -28,11 +28,6 @@ export default async function FAQDetailPage({
2828
2929 // Get all FAQ entries
3030 const allFAQs = Object . entries ( faq ) ;
31- const currentIndex = allFAQs . findIndex ( ( [ key ] ) => key === id ) ;
32-
33- // Get previous and next FAQs
34- const prevFAQ = currentIndex > 0 ? allFAQs [ currentIndex - 1 ] : null ;
35- const nextFAQ = currentIndex < allFAQs . length - 1 ? allFAQs [ currentIndex + 1 ] : null ;
3631
3732 // Get related FAQs (same category, excluding current)
3833 const relatedFAQs = allFAQs
@@ -72,50 +67,6 @@ export default async function FAQDetailPage({
7267 ) ) }
7368 </ div >
7469
75- { /* Navigation: Previous & Next */ }
76- < div className = "flex items-center justify-between gap-4 py-8 border-t border-b border-border mb-12" >
77- < div className = "flex-1" >
78- { prevFAQ && (
79- < Link
80- href = { `/${ langName } /faq/${ prevFAQ [ 0 ] } ` }
81- className = "group flex items-center gap-2 text-sm hover:text-primary transition-colors"
82- >
83- < ChevronLeft className = "w-4 h-4 group-hover:-translate-x-1 transition-transform" />
84- < div >
85- < div className = "text-xs text-muted-foreground mb-1" >
86- { dict . FAQ ?. previous || 'Previous' }
87- </ div >
88- < div className = "font-medium line-clamp-1" > { prevFAQ [ 1 ] . Question } </ div >
89- </ div >
90- </ Link >
91- ) }
92- </ div >
93-
94- < Link
95- href = { `/${ langName } /faq` }
96- className = "px-4 py-2 text-sm font-medium rounded-md bg-secondary hover:bg-secondary/80 transition-colors"
97- >
98- { dict . FAQ ?. backToList || 'Back to FAQ' }
99- </ Link >
100-
101- < div className = "flex-1 flex justify-end" >
102- { nextFAQ && (
103- < Link
104- href = { `/${ langName } /faq/${ nextFAQ [ 0 ] } ` }
105- className = "group flex items-center gap-2 text-sm hover:text-primary transition-colors text-right"
106- >
107- < div >
108- < div className = "text-xs text-muted-foreground mb-1" >
109- { dict . FAQ ?. next || 'Next' }
110- </ div >
111- < div className = "font-medium line-clamp-1" > { nextFAQ [ 1 ] . Question } </ div >
112- </ div >
113- < ChevronRight className = "w-4 h-4 group-hover:translate-x-1 transition-transform" />
114- </ Link >
115- ) }
116- </ div >
117- </ div >
118-
11970 { /* Related FAQs */ }
12071 { relatedFAQs . length > 0 && (
12172 < section >
0 commit comments