import Link from 'next/link'; import { getDataSource, EmailTemplate } from '@/lib/database'; export default async function EmailTemplateDetailPage(props: { params: Promise<{ id: string }> }) { const { id } = await props.params; // Fetch email template from the database const dataSource = await getDataSource(); const emailTemplateRepository = dataSource.getRepository(EmailTemplate); const emailTemplate = await emailTemplateRepository.findOne({ where: { id } }); if (!emailTemplate) { return (
The requested email template could not be found.