it works!

This commit is contained in:
2025-02-05 11:16:03 -06:00
parent 246b7072b6
commit 15e5957ecf
@@ -3,11 +3,16 @@ import BarkButton from "../../common/components/BarkButton.tsx";
import {Link, NavLink} from "react-router"; import {Link, NavLink} from "react-router";
import useInventoryList from "./hooks/useInventoryList.tsx"; import useInventoryList from "./hooks/useInventoryList.tsx";
function InventoryList() { function InventoryList() {
const data = useInventoryList(); const rawData = useInventoryList();
if (rawData.isPending) return 'Loading...'
if (rawData.error) return 'An error has occurred: ' + rawData.error.message
const data = rawData.data
return ( return (
<> <>
@@ -25,7 +30,6 @@ function InventoryList() {
<NavLink to={'/inventory/addItem'}><BarkButton>Add Item</BarkButton></NavLink> <NavLink to={'/inventory/addItem'}><BarkButton>Add Item</BarkButton></NavLink>
</Flex> </Flex>
<Table striped> <Table striped>
<Table.Thead> <Table.Thead>
<Table.Tr> <Table.Tr>