progress? pt2

This commit is contained in:
2025-01-15 11:51:21 -06:00
parent d1e5f7c61c
commit 3f6104aa9d
+2 -3
View File
@@ -1,11 +1,10 @@
import {useQuery} from "@tanstack/react-query";
import {Link} from "react-router";
import inventory from "./inventory.tsx";
import { Key, ReactElement, JSXElementConstructor, ReactNode, ReactPortal } from "react";
function Inventory() {
const {isPending, error, data, isFetching} = useQuery({
const { isPending, error, data, isFetching } = useQuery({
queryKey: ['inventory'],
queryFn: async () => {
const response = await fetch(
@@ -43,7 +42,7 @@ function Inventory() {
</tr>
</thead>
<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}>
<td>{data.brand}</td>
<td>{data.name}</td>