Modals and API calls working for admin tab

This commit is contained in:
2025-03-01 23:32:41 -05:00
parent d68e8864a0
commit 843970e229
34 changed files with 1150 additions and 131 deletions

View File

@@ -0,0 +1,46 @@
import clsx from "clsx";
export default function TableBody({
bodyElements
}:{
bodyElements: React.ReactNode[][];
}){
return (
<tbody>
{
bodyElements.map((row, rowIndex) => (
<tr
key={rowIndex}
>
{
row.map((element, elementIndex) => (
<td
key={elementIndex}
className={clsx(
{
"w-0": elementIndex === 0 || elementIndex === row.length - 1
}
)}
>
<div
className={clsx(
"bg-neutral-200 dark:bg-neutral-700",
{
"py-4 my-2": elementIndex < row.length - 1,
"rounded-l pl-2": elementIndex === 0,
"rounded-r pr-2": elementIndex === row.length - 1
}
)}
>
{element}
</div>
</td>
))
}
</tr>
))
}
</tbody>
);
}