import { useNavigate } from 'react-router-dom'; import { DATABASE_TEMPLATES, type DatabaseTemplate } from '@/features/database/templates'; import { useSQLEditorContext } from '@/features/database/contexts/SQLEditorContext'; import { TemplateCard } from '@/features/database/components/TemplateCard'; export default function TemplatesPage() { const navigate = useNavigate(); const { addTab } = useSQLEditorContext(); const handleTemplateClick = (template: DatabaseTemplate) => { // Create a new tab with the template's SQL query prefilled addTab(template.sql, template.title); // Navigate to the SQL Editor page void navigate('/dashboard/database/sql-editor'); }; return (