diff --git a/app/details/[slug]/page.tsx b/app/details/[slug]/page.tsx
new file mode 100644
index 0000000..6adfd1f
--- /dev/null
+++ b/app/details/[slug]/page.tsx
@@ -0,0 +1,30 @@
+import DetailContent from "@/components/details/details-content";
+import Footer from "@/components/landing-page/footer";
+import Navbar from "@/components/landing-page/navbar";
+import Image from "next/image";
+
+export default function Home() {
+ return (
+
{articleDetail?.tags ? (
-
- {articleDetail.tags}
-
+ articleDetail.tags
+ .split(",") // pisahkan berdasarkan koma
+ .map((tag: string, index: number) => (
+
+ {tag.trim()}
+
+ ))
) : (
Tidak ada tag
)}
diff --git a/components/landing-page/citizen-news/citizen-news.tsx b/components/landing-page/citizen-news/citizen-news.tsx
index d2d03d8..ff9d296 100644
--- a/components/landing-page/citizen-news/citizen-news.tsx
+++ b/components/landing-page/citizen-news/citizen-news.tsx
@@ -13,6 +13,7 @@ type Article = {
description: string;
categoryName: string;
createdAt: string;
+ slug: string;
createdByName: string;
customCreatorName: string;
thumbnailUrl: string;
@@ -150,7 +151,7 @@ export default function CitizenNews() {
{/* Image + Category */}
@@ -319,7 +320,7 @@ export default function CitizenNews() {
-
+
{mainArticle && (
-
+
{otherArticles.map((article, index) => (
-
+
{/* Image + Category */}
@@ -318,7 +319,7 @@ export default function DevelopmentNews() {
-
+
{mainArticle && (
-
+
{otherArticles.map((article, index) => (
-
+
{articles.length > 0 && (
-
+
{articles.slice(1, 5).map((article, index) => (
-
+
{mainArticle && (
-
+
{otherArticles.map((article, index) => (
-
+
-
+
{currentArticles.map((article, index) => (
-
+
-
+
-
+
-
+
{popularPosts.slice(1, 5).map((post, index) => (
-
+
(
-
+
(
-
+
{
+ const copyUrlArticle = async (slug: any) => {
const url =
`${window.location.protocol}//${window.location.host}` +
- "/detail/" +
- `${id}`;
+ "/details/" +
+ `${slug}`;
try {
await navigator.clipboard.writeText(url);
successToast("Success", "Article Copy to Clipboard");
@@ -263,7 +263,9 @@ export default function ArticleTable() {
- copyUrlArticle(article.id)}>
+ copyUrlArticle(article.slug)}
+ >
Copy Url Article