mirror of
https://github.com/BarkProductions/barkman.git
synced 2026-06-13 06:11:55 +00:00
it works!
This commit is contained in:
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user