From 179e27f8afb3bd6e80b7273f66534cad883b8e2f Mon Sep 17 00:00:00 2001 From: Martin Berka Date: Mon, 12 Jun 2023 21:52:30 +0200 Subject: [PATCH] =?UTF-8?q?=C3=9Apravy=20pro=20linter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/App.tsx | 48 +++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/client/src/App.tsx b/client/src/App.tsx index 0767b65..15ab594 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -125,29 +125,29 @@ function App() { } } - const addToCart = async () => { - // TODO aktuálně nefunkční - nedokážeme poslat PHPSESSIONID cookie - // if (data?.pizzaDay?.orders) { - // for (const order of data?.pizzaDay?.orders) { - // for (const pizzaOrder of order.pizzaList) { - // const url = 'https://www.pizzachefie.cz/pridat.html'; - // const payload = new URLSearchParams(); - // payload.append('varId', pizzaOrder.varId.toString()); - // await fetch(url, { - // method: "POST", - // mode: "no-cors", - // cache: "no-cache", - // credentials: "same-origin", - // headers: { - // 'Content-Type': 'application/x-www-form-urlencoded', - // }, - // body: payload, - // }) - // } - // } - // // TODO otevřít košík v nové záložce - // } - } + // const addToCart = async () => { + // TODO aktuálně nefunkční - nedokážeme poslat PHPSESSIONID cookie + // if (data?.pizzaDay?.orders) { + // for (const order of data?.pizzaDay?.orders) { + // for (const pizzaOrder of order.pizzaList) { + // const url = 'https://www.pizzachefie.cz/pridat.html'; + // const payload = new URLSearchParams(); + // payload.append('varId', pizzaOrder.varId.toString()); + // await fetch(url, { + // method: "POST", + // mode: "no-cors", + // cache: "no-cache", + // credentials: "same-origin", + // headers: { + // 'Content-Type': 'application/x-www-form-urlencoded', + // }, + // body: payload, + // }) + // } + // } + // // TODO otevřít košík v nové záložce + // } + // } const renderFoodTable = (name, food) => { return @@ -174,7 +174,7 @@ function App() { return
Načítám data...
} - const noOrders = data?.pizzaDay?.orders?.length == 0; + const noOrders = data?.pizzaDay?.orders?.length === 0; return ( <>