From 83f1cd3dae1c5f2353ef32ae9c1ac59030ee6268 Mon Sep 17 00:00:00 2001 From: Andreas Date: Tue, 25 Jun 2024 08:20:04 +0200 Subject: [PATCH] renamed TableGen to EntityManagementTable --- src/components/client/TableGen.tsx | 2 +- src/components/client/admin/PostTable.tsx | 6 +++--- src/components/server/admin/views/PostView.tsx | 2 +- src/components/server/admin/views/ProjectView.tsx | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/client/TableGen.tsx b/src/components/client/TableGen.tsx index 93dfb24..9e08590 100644 --- a/src/components/client/TableGen.tsx +++ b/src/components/client/TableGen.tsx @@ -12,7 +12,7 @@ type Props = { options?:TableGenOptions } -export default function TableGen(props:Props){ +export default function EntityManagementTable(props:Props){ const options = props.options ? props.options : {editButton: true, deleteButton: true} console.log(props.headings) return <> diff --git a/src/components/client/admin/PostTable.tsx b/src/components/client/admin/PostTable.tsx index ad34c4d..97597a0 100644 --- a/src/components/client/admin/PostTable.tsx +++ b/src/components/client/admin/PostTable.tsx @@ -9,7 +9,7 @@ import React, { useLayoutEffect, useRef } from "react"; -import TableGen from "../TableGen"; +import EntityManagementTable from "../TableGen"; import toast from "react-hot-toast"; import PostEditor, { EditorProps } from "./PostEditor"; import { @@ -169,10 +169,10 @@ export default function PostTable(props: Props) { } return <> - + {posts.map((postData: Partial) => )} - + } \ No newline at end of file diff --git a/src/components/server/admin/views/PostView.tsx b/src/components/server/admin/views/PostView.tsx index 0821368..1b5612e 100644 --- a/src/components/server/admin/views/PostView.tsx +++ b/src/components/server/admin/views/PostView.tsx @@ -3,7 +3,7 @@ cache: 'no-store' import { tryFetchPosts } from "@/app/api/post/route"; import { constructAPIUrl } from "@/util/Utils"; import { ReactNode, useEffect } from "react"; -import TableGen from "../../../client/TableGen"; +import EntityManagementTable from "../../../client/TableGen"; import PostTable from "@/components/client/admin/PostTable"; import { deletePost, getPostsWithBuckets, updatePost } from "@/app/lib/actions/entityManagement/postActions"; import { getProjects } from "@/app/lib/actions/entityManagement/projectActions"; diff --git a/src/components/server/admin/views/ProjectView.tsx b/src/components/server/admin/views/ProjectView.tsx index 3bc5f7b..f24f775 100644 --- a/src/components/server/admin/views/ProjectView.tsx +++ b/src/components/server/admin/views/ProjectView.tsx @@ -3,7 +3,7 @@ cache: 'no-store' import { tryFetchPosts } from "@/app/api/post/route"; import { constructAPIUrl } from "@/util/Utils"; import { ReactNode, useEffect } from "react"; -import TableGen from "../../../client/TableGen"; +import EntityManagementTable from "../../../client/TableGen"; import PostTable from "@/components/client/admin/PostTable"; import { deletePost, getPostsWithBuckets, updatePost } from "@/app/lib/actions/entityManagement/postActions"; import { getProjects } from "@/app/lib/actions/entityManagement/projectActions"; @@ -53,7 +53,7 @@ export default async function ProjectView(props:Props){ a.push(key) } // return a.map((e)=>
{e}
); - return <> + return <> })()} {/*