summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/[lng]/evcp/(evcp)/(system)/email-template/[slug]/page.tsx40
1 files changed, 23 insertions, 17 deletions
diff --git a/app/[lng]/evcp/(evcp)/(system)/email-template/[slug]/page.tsx b/app/[lng]/evcp/(evcp)/(system)/email-template/[slug]/page.tsx
index 2654489f..d081b69a 100644
--- a/app/[lng]/evcp/(evcp)/(system)/email-template/[slug]/page.tsx
+++ b/app/[lng]/evcp/(evcp)/(system)/email-template/[slug]/page.tsx
@@ -1,38 +1,44 @@
-import * as React from "react"
-import { type Metadata } from "next"
-import { notFound } from "next/navigation"
+/* IMPORT */
+import { getTemplateAction } from '@/lib/email-template/service';
+import { notFound } from 'next/navigation';
+import { TemplateEditor } from '@/lib/email-template/editor/template-editor';
+import { type Metadata } from 'next';
-import { getTemplateAction } from "@/lib/email-template/service"
-import { TemplateEditor } from "@/lib/email-template/editor/template-editor"
+// ----------------------------------------------------------------------------------------------------
+/* TYPES */
interface TemplateDetailPageProps {
params: Promise<{
- slug: string
- }>
+ slug: string;
+ }>;
}
+// ----------------------------------------------------------------------------------------------------
+
export async function generateMetadata({ params }: TemplateDetailPageProps): Promise<Metadata> {
- const { slug } = await params
- const result = await getTemplateAction(slug)
+ const { slug } = await params;
+ const result = await getTemplateAction(slug);
if (!result.success || !result.data) {
return {
- title: "템플릿을 찾을 수 없음",
- }
+ title: '템플릿을 찾을 수 없음',
+ };
}
return {
title: `${result.data.name} - 템플릿 편집`,
description: result.data.description || `${result.data.name} 템플릿을 편집합니다.`,
- }
+ };
}
+// ----------------------------------------------------------------------------------------------------
+
export default async function TemplateDetailPage({ params }: TemplateDetailPageProps) {
- const { slug } = await params
- const result = await getTemplateAction(slug)
+ const { slug } = await params;
+ const result = await getTemplateAction(slug);
if (!result.success || !result.data) {
- notFound()
+ notFound();
}
return (
@@ -42,5 +48,5 @@ export default async function TemplateDetailPage({ params }: TemplateDetailPageP
initialTemplate={result.data}
/>
</div>
- )
-} \ No newline at end of file
+ );
+}