basic table view added
This commit is contained in:
parent
c17768e5bc
commit
fb57f72d7b
42
src/components/ResourceTable.tsx
Normal file
42
src/components/ResourceTable.tsx
Normal 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;
|
@ -1,11 +1,12 @@
|
||||
import { type NextPage } from "next";
|
||||
import Head from "next/head";
|
||||
import ResourceTable from "~/components/ResourceTable";
|
||||
import { api } from "~/utils/api";
|
||||
|
||||
const Home: NextPage = () => {
|
||||
|
||||
const query = api.auditoryResource.getAll.useQuery();
|
||||
console.log(query.data);
|
||||
//const query = api.auditoryResource.getAll.useQuery();
|
||||
//console.log(query.data);
|
||||
|
||||
return (
|
||||
<>
|
||||
@ -16,6 +17,7 @@ const Home: NextPage = () => {
|
||||
</Head>
|
||||
<main>
|
||||
<h1>under construction</h1>
|
||||
<ResourceTable />
|
||||
</main>
|
||||
</>
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user