Refaktor, rozdělení api, zpřehlednění kódu
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user