diff --git a/src/app/[locale]/keyword-cloud/components/QuarterNavigator.tsx b/src/app/[locale]/keyword-cloud/components/QuarterNavigator.tsx new file mode 100644 index 0000000..b189d38 --- /dev/null +++ b/src/app/[locale]/keyword-cloud/components/QuarterNavigator.tsx @@ -0,0 +1,70 @@ +'use client'; + +import React from 'react'; +import { ChevronLeft, ChevronRight } from 'lucide-react'; +import { cn } from '@/lib/utils'; + +interface QuarterNavigatorProps { + current: string; + quarters: string[]; + onNavigate: (quarter: string) => void; +} + +export function QuarterNavigator({ current, quarters, onNavigate }: QuarterNavigatorProps) { + const currentIndex = quarters.indexOf(current); + const canGoPrev = currentIndex > 0; + const canGoNext = currentIndex < quarters.length - 1; + + return ( +
+ {/* 上一个季度按钮 */} + + + {/* 当前季度显示 */} +
+
+ {current} +
+
+ + {/* 下一个季度按钮 */} + +
+ ); +}