import { useQuery } from "@tanstack/react-query"; import { Lightbulb, ArrowRight } from "lucide-react"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Button } from "@/components/atoms/Button"; import { useStore } from "@/lib/store"; interface Suggestion { minutes: number; reason: string; } interface SuggestionChipsProps { onSuggestionSelect: (minutes: number) => void; className?: string; } export function SuggestionChips({ onSuggestionSelect, className = "" }: SuggestionChipsProps) { const deviceId = useStore((state) => state.deviceId); const { data: suggestions, isLoading } = useQuery<{ suggestions: Suggestion[] }>({ queryKey: ['/api/suggestions', { deviceId }], enabled: !!deviceId, }); if (isLoading) { return ( Smart Suggestions
{[1, 2, 3].map((i) => (
))}
); } const suggestionList = suggestions?.suggestions || [ { minutes: 25, reason: "Classic Pomodoro technique - great for starting out." }, { minutes: 15, reason: "Short sprints help build focus habits." }, { minutes: 40, reason: "Extended sessions for deep work." } ]; return ( Smart Suggestions
{suggestionList.map((suggestion, index) => ( ))}
); }