mirror of
https://github.com/BarkProductions/barkman.git
synced 2026-06-13 06:11:55 +00:00
progress? pt2
This commit is contained in:
@@ -1,11 +1,10 @@
|
|||||||
import {useQuery} from "@tanstack/react-query";
|
import {useQuery} from "@tanstack/react-query";
|
||||||
import {Link} from "react-router";
|
import {Link} from "react-router";
|
||||||
import inventory from "./inventory.tsx";
|
import inventory from "./inventory.tsx";
|
||||||
import { Key, ReactElement, JSXElementConstructor, ReactNode, ReactPortal } from "react";
|
|
||||||
|
|
||||||
function Inventory() {
|
function Inventory() {
|
||||||
|
|
||||||
const {isPending, error, data, isFetching} = useQuery({
|
const { isPending, error, data, isFetching } = useQuery({
|
||||||
queryKey: ['inventory'],
|
queryKey: ['inventory'],
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
const response = await fetch(
|
const response = await fetch(
|
||||||
@@ -43,7 +42,7 @@ function Inventory() {
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{data.map((data: { id: Key | null | undefined; brand: string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | null | undefined; name: string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | null | undefined; status: string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | null | undefined; }) => (
|
{data.map((data) => (
|
||||||
<tr key={data.id}>
|
<tr key={data.id}>
|
||||||
<td>{data.brand}</td>
|
<td>{data.brand}</td>
|
||||||
<td>{data.name}</td>
|
<td>{data.name}</td>
|
||||||
|
|||||||
Reference in New Issue
Block a user