- |
-
- {e?.User.username}
-
- |
-
-
- {e?.forumMaster_KategoriReportId === null ? (
- Lainnya
- ) : (
- {e?.ForumMaster_KategoriReport.title}
- )}
-
- |
-
- {/*
-
- {e?.Forum_Posting.Author.username}
-
- |
-
-
-
-
-
-
-
- | */}
-
-
-
-
- {e?.Forum_Posting.ForumMaster_StatusPosting?.status}
-
-
- |
-
-
-
-
- {new Intl.DateTimeFormat(["id-ID"], { dateStyle: "medium" }).format(
- e.createdAt
+ const renderTableBody = () => {
+ if (!Array.isArray(data) || data.length === 0) {
+ return (
+
+ |
+
+ Tidak ada data
+
+ |
+
+ )
+ }
+ return data?.map((e, i) => (
+
+ |
+
+ {e?.User.username}
+
+ |
+
+
+ {e?.forumMaster_KategoriReportId === null ? (
+ Lainnya
+ ) : (
+ {e?.ForumMaster_KategoriReport.title}
)}
-
-
- |
-
-
-
- {/* */}
-
- {/* {
- if (val) {
- onLoadData();
+
+ |
+
+ {/*
+
+ {e?.Forum_Posting.Author.username}
+
+ |
+
+
+
+
+
+
+
+ | */}
+
+
+
+ */}
-
- |
-
- ));
+ >
+ {e?.Forum_Posting?.ForumMaster_StatusPosting?.status}
+
+
+ |
+
+
+
+
+ {new Intl.DateTimeFormat("id-ID", { dateStyle: "medium" }).format(
+ new Date(e?.createdAt)
+ )}
+
+
+ |
+
+
+
+ {/* */}
+
+ {/* {
+ if (val) {
+ onLoadData();
+ }
+ }}
+ /> */}
+
+ |
+
+ ));
+ }
return (
<>
@@ -172,14 +186,14 @@ function TableView({ listData }: { listData: any }) {
color={AdminColor.softBlue}
component={