From 243342e0f6908a3fee1b853d50de0009fc0cf75f Mon Sep 17 00:00:00 2001 From: Kira Muhlbauer Date: Wed, 27 Sep 2023 18:17:55 -0600 Subject: [PATCH] remove more unused code --- app/src/App.test.tsx | 2 -- app/src/admin/dishList.tsx | 10 +++++----- app/src/admin/styledEmail.tsx | 0 app/src/admin/styledUsers.tsx | 0 app/src/routes/borrow.tsx | 1 - 5 files changed, 5 insertions(+), 8 deletions(-) delete mode 100644 app/src/App.test.tsx delete mode 100644 app/src/admin/styledEmail.tsx delete mode 100644 app/src/admin/styledUsers.tsx diff --git a/app/src/App.test.tsx b/app/src/App.test.tsx deleted file mode 100644 index 920c33c9..00000000 --- a/app/src/App.test.tsx +++ /dev/null @@ -1,2 +0,0 @@ -import React from 'react'; -import { render, screen } from '@testing-library/react'; diff --git a/app/src/admin/dishList.tsx b/app/src/admin/dishList.tsx index 2283f099..20fd13b1 100644 --- a/app/src/admin/dishList.tsx +++ b/app/src/admin/dishList.tsx @@ -26,7 +26,7 @@ const DishData = ({ origDishList }) => { const [query, setQuery] = useState(""); const [headerChecked, setHeaderChecked] = useState(false); const [selectedList, setSelectedList] = useState(Array(dishList.length).fill(false)); - const [selectedCount, setSelectedCount] = useState(0); + const [selectedCount, setSelectedCount] = useState(0); // eslint-disable-line @typescript-eslint/no-unused-vars const [shownDishList, setShownDishList] = useState(dishList); const [dishTypeFilter, setDishTypeFilter] = useState({ "All": false, "Mug": false, "Dish": false }); const [dishFilterClick, setDishFilterClick] = useState(false); @@ -106,7 +106,7 @@ const DishData = ({ origDishList }) => { }, [dishStatusFilter, dishTypeFilter]) /// /// - const handleDishStatusClick = () => { + const handleDishStatusClick = () => { // eslint-disable-line @typescript-eslint/no-unused-vars setDishStatusClick(!dishStatusClick); } const handleAllStatus = () => { @@ -174,7 +174,7 @@ const DishData = ({ origDishList }) => { } return dishes.filter(dish => dish.id.includes(query)); } - const searchBarHandleChange = (value) => { + const searchBarHandleChange = (value) => { // eslint-disable-line @typescript-eslint/no-unused-vars setQuery(value); setShownDishList(getSearchedDishes(query, dishList)); } @@ -307,7 +307,7 @@ const DishData = ({ origDishList }) => { ) } -const TransactionHistory = () => { +/* const TransactionHistory = () => { return (
@@ -322,6 +322,6 @@ const TransactionHistory = () => { const DishDashboard = () => { -} +} */ export default DishData; \ No newline at end of file diff --git a/app/src/admin/styledEmail.tsx b/app/src/admin/styledEmail.tsx deleted file mode 100644 index e69de29b..00000000 diff --git a/app/src/admin/styledUsers.tsx b/app/src/admin/styledUsers.tsx deleted file mode 100644 index e69de29b..00000000 diff --git a/app/src/routes/borrow.tsx b/app/src/routes/borrow.tsx index f368b69e..d7bafe9f 100644 --- a/app/src/routes/borrow.tsx +++ b/app/src/routes/borrow.tsx @@ -48,7 +48,6 @@ export default () => { return false; } setConfirm(false); - const user = currentUser?.id || null; axios .post(