-
Edit Post
+
diff --git a/src/app/(admin)/admin/posts/_components/Table.tsx b/src/app/(admin)/admin/posts/_components/Table.tsx
index ec95ed90..0d08838a 100644
--- a/src/app/(admin)/admin/posts/_components/Table.tsx
+++ b/src/app/(admin)/admin/posts/_components/Table.tsx
@@ -2,7 +2,7 @@
import { useRouter } from "next-nprogress-bar";
import { useEffect, useState } from "react";
import DataTable, { TableColumn } from "react-data-table-component";
-import { FaRegTrashAlt } from "react-icons/fa";
+import { FaRegTrashAlt, FaDownload } from "react-icons/fa";
import { MdPublish, MdUnpublished } from "react-icons/md";
import { toast } from "sonner";
@@ -10,11 +10,33 @@ import { postDelete, updatePostStatus } from "@/actions/post";
import { PostWithTagsAndUser } from "@/types/entityRelations";
import { stringifyCompleteDate } from "@/utils/atomics";
-export default function PostTable({ data }: { data: PostWithTagsAndUser[] }) {
+export default function PostTable({
+ data,
+}: Readonly<{ data: PostWithTagsAndUser[] }>) {
const [loader, setLoader] = useState(true);
const router = useRouter();
const columns: TableColumn
[] = [
+ {
+ name: "Share Image",
+ cell: (row: PostWithTagsAndUser) => (
+
+ ),
+ width: "80px",
+ sortable: false,
+ },
{
name: "Title",
selector: (row: PostWithTagsAndUser) => row.title,
@@ -30,7 +52,6 @@ export default function PostTable({ data }: { data: PostWithTagsAndUser[] }) {
cell: (row: PostWithTagsAndUser) => (
{row.tags.map((tag) => tag.tagName).join(", ")}
),
-
sortable: false,
},
{
@@ -66,14 +87,20 @@ export default function PostTable({ data }: { data: PostWithTagsAndUser[] }) {
cell: (row: PostWithTagsAndUser) => (
diff --git a/src/app/(main)/berita/[slug]/_components/BackButton.tsx b/src/app/(main)/berita/[slug]/_components/BackButton.tsx
index e63ebce6..030c7063 100644
--- a/src/app/(main)/berita/[slug]/_components/BackButton.tsx
+++ b/src/app/(main)/berita/[slug]/_components/BackButton.tsx
@@ -11,7 +11,7 @@ export default function GoBack() {
return (