From d110f85e30794f6ddf64f43ffd4a362ac297ceea Mon Sep 17 00:00:00 2001 From: Rama Priyanto Date: Fri, 7 Feb 2025 10:06:38 +0700 Subject: [PATCH] fix magazine --- components/landing/ENewsPolri.tsx | 7 +++++-- components/main/detail/e-magazine-detail.tsx | 11 +++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/components/landing/ENewsPolri.tsx b/components/landing/ENewsPolri.tsx index a8200bb..5fd2c5b 100644 --- a/components/landing/ENewsPolri.tsx +++ b/components/landing/ENewsPolri.tsx @@ -70,7 +70,11 @@ export default function ENewsPolri() { thumbnail @@ -81,7 +85,6 @@ export default function ENewsPolri() {

- {" "}

{convertDateFormat(newsItem.createdAt)} WIB

diff --git a/components/main/detail/e-magazine-detail.tsx b/components/main/detail/e-magazine-detail.tsx index 648c768..042f125 100644 --- a/components/main/detail/e-magazine-detail.tsx +++ b/components/main/detail/e-magazine-detail.tsx @@ -1,5 +1,6 @@ "use client"; import { ChevronRightIcon } from "@/components/icons"; +import { close, loading } from "@/config/swal"; import { getMagazineById } from "@/service/magazine"; import { convertDateFormat, @@ -24,16 +25,18 @@ export default function EMagazineDetail() { }, [id]); const initFetch = async () => { + loading(); const res = await getMagazineById(String(id)); const data = res?.data?.data; setDetailData(data); setDetailFiles(data?.files); + close(); }; const doDownload = async (fileName: string, title: string): Promise => { try { const response = await fetch( - `https://38.47.180.165:8802/magazine-files/viewer/${fileName}` + `https://kontenhumas.com/magazine-files/viewer/${fileName}` ); if (!response.ok) { @@ -80,11 +83,7 @@ export default function EMagazineDetail() { className="h-[380px] rounded-md py-1" /> */} emagazine