diff --git a/app/[locale]/(admin)/admin/settings/tenant/page.tsx b/app/[locale]/(admin)/admin/settings/tenant/page.tsx index 180ff58..56887fc 100644 --- a/app/[locale]/(admin)/admin/settings/tenant/page.tsx +++ b/app/[locale]/(admin)/admin/settings/tenant/page.tsx @@ -37,7 +37,7 @@ import { } from "@tanstack/react-table"; import useTableColumns from "./component/columns"; import TablePagination from "@/components/table/table-pagination"; -import TenantSettingsPageTable from "./component/table-user-level"; +import TenantSettingsPageTable from "./component/tenant-settings-content-table"; function TenantSettingsContent() { const [activeTab, setActiveTab] = useState("workflows"); diff --git a/app/[locale]/(public)/content/image/detail/[id]/page.tsx b/app/[locale]/(public)/content/image/detail/[id]/page.tsx index 074790a..f9ddead 100644 --- a/app/[locale]/(public)/content/image/detail/[id]/page.tsx +++ b/app/[locale]/(public)/content/image/detail/[id]/page.tsx @@ -5,7 +5,13 @@ import ImageDetail from "@/components/main/content/image-detail"; export default function DetailImageInfo() { const params = useParams(); - const id = params?.id as string; + const idParam = params?.id; + const id = + typeof idParam === "string" + ? Number(idParam) + : Array.isArray(idParam) + ? Number(idParam[0]) + : 0; return ; } diff --git a/components/main/content/image-detail.tsx b/components/main/content/image-detail.tsx index 5e8347c..8b28d83 100644 --- a/components/main/content/image-detail.tsx +++ b/components/main/content/image-detail.tsx @@ -20,7 +20,7 @@ import { toBase64, shimmer } from "@/utils/globals"; import { Skeleton } from "@/components/ui/skeleton"; import { getArticleDetail } from "@/service/content/content"; -export default function ImageDetail({ id }: { id: string }) { +export default function ImageDetail({ id }: { id: number }) { const [copied, setCopied] = useState(false); const [showShareMenu, setShowShareMenu] = useState(false); const [data, setData] = useState(null); @@ -111,12 +111,12 @@ export default function ImageDetail({ id }: { id: string }) { } catch (err) { console.error("Gagal ambil detail artikel:", err); // fallback ke API lama - try { - const fallback = await getDetail(id); - setData(fallback?.data?.data); - } catch (err2) { - console.error("Fallback API juga gagal:", err2); - } + // try { + // const fallback = await getDetail(id); + // setData(fallback?.data?.data); + // } catch (err2) { + // console.error("Fallback API juga gagal:", err2); + // } } finally { setLoading(false); } diff --git a/service/content/content.ts b/service/content/content.ts index 6187000..d5b94cb 100644 --- a/service/content/content.ts +++ b/service/content/content.ts @@ -578,7 +578,7 @@ export interface ArticleDetailResponse { } // Function to fetch article detail -export async function getArticleDetail(id: string) { +export async function getArticleDetail(id: number) { const url = `articles/${id}`; return await httpGetInterceptor(url); }