import { useState } from 'react'; import { TEMPLATES, TEMPLATE_CATEGORIES } from '../../constants/templates'; export function TemplatesTab({ onApplyTemplate }) { const [selectedCategory, setSelectedCategory] = useState('All'); const filteredTemplates = selectedCategory === 'All' ? TEMPLATES : TEMPLATES.filter((t) => t.category === selectedCategory); return (

Templates

{TEMPLATE_CATEGORIES.map((cat) => ( ))}
{filteredTemplates.map((template) => ( ))}
); }