mirror of
https://github.com/BarkProductions/barkman.git
synced 2026-06-13 06:11:55 +00:00
forms pt3
This commit is contained in:
@@ -4,7 +4,6 @@ import {useParams} from "react-router";
|
|||||||
import {useMutation, useQuery, useQueryClient} from "@tanstack/react-query";
|
import {useMutation, useQuery, useQueryClient} from "@tanstack/react-query";
|
||||||
import {InventoryItem} from "./types.ts";
|
import {InventoryItem} from "./types.ts";
|
||||||
import {useEffect} from "react";
|
import {useEffect} from "react";
|
||||||
import {put} from "axios";
|
|
||||||
|
|
||||||
type EditableInventoryItem = Omit<InventoryItem, 'id'>;
|
type EditableInventoryItem = Omit<InventoryItem, 'id'>;
|
||||||
|
|
||||||
@@ -27,9 +26,6 @@ function EditItem() {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const { isPending, error, data, isFetching } = useQuery({
|
const { isPending, error, data, isFetching } = useQuery({
|
||||||
queryKey: ['inventory', params.itemId],
|
queryKey: ['inventory', params.itemId],
|
||||||
queryFn: async (): Promise<InventoryItem> => {
|
queryFn: async (): Promise<InventoryItem> => {
|
||||||
|
|||||||
Reference in New Issue
Block a user