renamed TableGen to EntityManagementTable
This commit is contained in:
parent
395234f919
commit
83f1cd3dae
@ -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 <>
|
||||
|
||||
@ -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 <>
|
||||
<TableGen key="der-table" headings={props.headings}>
|
||||
<EntityManagementTable key="der-table" headings={props.headings}>
|
||||
{posts.map((postData: Partial<PostAttributesWithBuckets>) => <TableRow headings={props.headings}
|
||||
postData={postData}
|
||||
key={postData.id}/> )}
|
||||
</TableGen>
|
||||
</EntityManagementTable>
|
||||
</>
|
||||
}
|
||||
@ -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";
|
||||
|
||||
@ -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)=> <div key={e}>{e}</div> );
|
||||
return <TableGen headings={a}><></></TableGen>
|
||||
return <EntityManagementTable headings={a}><></></EntityManagementTable>
|
||||
})()}
|
||||
{/* <PostTable data={posts}
|
||||
projects={projects}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user