From 5236d4d9d5f4d2d22e9dbb883082816fef1e2fe7 Mon Sep 17 00:00:00 2001 From: Anang Yusman Date: Wed, 24 Sep 2025 17:01:07 +0800 Subject: [PATCH] update --- components/details/details-content.tsx | 17 +- components/editor/tinymce-editor.tsx | 8 +- components/form/article/edit-article-form.tsx | 9 +- .../generate-ai-content-rewrite-form.tsx | 1 + .../citizen-news/citizen-news.tsx | 6 +- .../citizen-news/header-citizen.tsx | 6 +- .../development/development-news.tsx | 6 +- .../development/header-development.tsx | 6 +- components/landing-page/header.tsx | 8 +- .../landing-page/health/header-health.tsx | 6 +- .../landing-page/health/health-news.tsx | 6 +- .../landing-page/latest-and-popular.tsx | 8 +- components/landing-page/latest.tsx | 8 +- components/landing-page/news.tsx | 6 +- package-lock.json | 3710 +++++++++++------ 15 files changed, 2390 insertions(+), 1421 deletions(-) diff --git a/components/details/details-content.tsx b/components/details/details-content.tsx index 515a5c0..dbb183b 100644 --- a/components/details/details-content.tsx +++ b/components/details/details-content.tsx @@ -13,6 +13,7 @@ type Article = { id: number; title: string; description: string; + htmlDescription: string; categoryName: string; createdAt: string; createdByName: string; @@ -21,7 +22,7 @@ type Article = { title: string; }[]; files: { - file_url: string; + fileUrl: string; file_alt: string; }[]; }; @@ -252,9 +253,9 @@ export default function DetailContent() {
- {articleDetail?.files?.[0]?.file_url ? ( + {articleDetail?.files?.[0]?.fileUrl ? ( Berita
-

+

Mikulnews.com - +
+
- {articleDetail?.description} -

diff --git a/components/editor/tinymce-editor.tsx b/components/editor/tinymce-editor.tsx index b8d8e57..ca67548 100644 --- a/components/editor/tinymce-editor.tsx +++ b/components/editor/tinymce-editor.tsx @@ -197,8 +197,8 @@ const TinyMCEEditor: React.FC = ({ height, language, placeholder, - readonly: readOnly, - disabled, + // readonly: readOnly, + // disabled, branding: false, elementpath: false, resize: false, @@ -270,9 +270,9 @@ const TinyMCEEditor: React.FC = ({ onInit={handleEditorInit} initialValue={initialData} onEditorChange={handleEditorChange} - disabled={disabled} + disabled={disabled || readOnly} apiKey={process.env.NEXT_PUBLIC_TINYMCE_API_KEY} - // init={editorConfig} + init={editorConfig} /> {/* Status bar */} diff --git a/components/form/article/edit-article-form.tsx b/components/form/article/edit-article-form.tsx index 0c0ab7a..d55147c 100644 --- a/components/form/article/edit-article-form.tsx +++ b/components/form/article/edit-article-form.tsx @@ -623,9 +623,7 @@ export default function EditArticleForm(props: { isDetail: boolean }) { alt="main" width={720} height={480} - src={ - detailfiles[mainImage]?.file_url || "/default-avatar.png" - } + src={detailfiles[mainImage]?.fileUrl || "/default-avatar.png"} className="w-[75%] mx-auto" />
@@ -640,7 +638,7 @@ export default function EditArticleForm(props: { isDetail: boolean }) { width={480} height={360} alt={`image-${index}`} - src={file.file_url || "/default-avatar.png"} + src={file.fileUrl || "/default-avatar.png"} className="h-[100px] object-cover w-[150px]" /> @@ -663,7 +661,7 @@ export default function EditArticleForm(props: { isDetail: boolean }) { width={480} height={360} alt={`image-${index}`} - src={file?.file_url || "/default-avatar.png"} + src={file?.fileUrl || "/default-avatar.png"} className="h-[100px] object-cover w-[150px]" />
@@ -683,6 +681,7 @@ export default function EditArticleForm(props: { isDetail: boolean }) {