From fb20768fa881841d3f80d12a276a9445feb6f514 Mon Sep 17 00:00:00 2001 From: joonhoekim <26rote@gmail.com> Date: Tue, 30 Sep 2025 05:04:33 +0000 Subject: (고건) 이메일 템플릿 정보 수정/복제 기능 에러 수정 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../(evcp)/(system)/email-template/[slug]/page.tsx | 40 +++++++++++++--------- 1 file changed, 23 insertions(+), 17 deletions(-) (limited to 'app') 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 { - 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} /> - ) -} \ No newline at end of file + ); +} -- cgit v1.2.3