Refaktor, rozdělení api, zpřehlednění kódu

This commit is contained in:
2023-10-03 22:52:09 +02:00
parent 829197e17a
commit 74893c38eb
15 changed files with 473 additions and 391 deletions

View File

@@ -1,8 +1,7 @@
import { Table } from "react-bootstrap";
import { useAuth } from "../context/auth";
import { Order, PizzaDayState, PizzaOrder } from "../types";
import { updatePizzaFee } from "../Api";
import PizzaOrderRow from "./PizzaOrderRow";
import { updatePizzaFee } from "../api/PizzaDayApi";
type Props = {
state: PizzaDayState,
@@ -12,8 +11,6 @@ type Props = {
}
export default function PizzaOrderList({ state, orders, onDelete, creator }: Props) {
const auth = useAuth();
const saveFees = async (customer: string, text?: string, price?: number) => {
await updatePizzaFee(customer, text, price);
}