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 (

Email Template Not Found

Back to Email Templates

The requested email template could not be found.

); } return (

Email Template Details

Edit Back to Email Templates

Template Information

ID
{emailTemplate.id}
Created At
{new Date(emailTemplate.createdAt).toLocaleString()}
Modified At
{new Date(emailTemplate.modifiedAt).toLocaleString()}
Title
{emailTemplate.title}
Content
{emailTemplate.content}
); }