basic table view added

This commit is contained in:
Brandon Egger 2023-03-15 19:44:12 -05:00
parent c17768e5bc
commit fb57f72d7b
2 changed files with 46 additions and 2 deletions

View File

@ -0,0 +1,42 @@
const ResourceTable = () => {
const ResourceEntry = () => {
return (
<tr>
<td>
test
</td>
<td>
test
</td>
</tr>
)
}
return(
<div className="px-4 w-full">
<table className="table-fixed w-full bg-gray-200 rounded-xl overflow-hidden">
<thead className="bg-neutral-800 rounded-xl overflow-hidden">
<tr>
<th>
<span className="text-white block px-4 py-2 text-left">
Resource
</span>
</th>
<th>
<span className="text-white block px-4 py-2 text-left">
Description
</span>
</th>
</tr>
</thead>
<tbody className="divide-y-[1px] divide-slate-300">
<ResourceEntry />
<ResourceEntry />
</tbody>
</table>
</div>
);
};
export default ResourceTable;

View File

@ -1,11 +1,12 @@
import { type NextPage } from "next"; import { type NextPage } from "next";
import Head from "next/head"; import Head from "next/head";
import ResourceTable from "~/components/ResourceTable";
import { api } from "~/utils/api"; import { api } from "~/utils/api";
const Home: NextPage = () => { const Home: NextPage = () => {
const query = api.auditoryResource.getAll.useQuery(); //const query = api.auditoryResource.getAll.useQuery();
console.log(query.data); //console.log(query.data);
return ( return (
<> <>
@ -16,6 +17,7 @@ const Home: NextPage = () => {
</Head> </Head>
<main> <main>
<h1>under construction</h1> <h1>under construction</h1>
<ResourceTable />
</main> </main>
</> </>
); );