'use client' import { useState } from 'react' import { useTitleSuggestions } from '@/hooks/use-title-suggestions' export default function TestTitleSuggestionsPage() { const [content, setContent] = useState('') const { suggestions, isAnalyzing, error } = useTitleSuggestions({ content, enabled: true // Always enabled for testing }) const wordCount = content.split(/\s+/).filter(w => w.length > 0).length return (
Word count: {wordCount} / 50
Status: {isAnalyzing ? 'Analyzing...' : 'Idle'}
{error &&Error: {error}
}→ {s.reasoning}
}No suggestions yet. Type 50+ words and wait 2 seconds.
)}