Skip to content

Commit

Permalink
fix item apis
Browse files Browse the repository at this point in the history
  • Loading branch information
nico-iaco committed Oct 22, 2024
1 parent d2bcb2e commit 238cba0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/component/ChooseFoodTransactionComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {setCurrentItem, setCurrentTransaction, setError} from "../action/Action"
import {SimpleItemRowComponent} from "./SimpleItemRowComponent";
import {useDispatch, useSelector} from "react-redux";
import {StepperComponentProps} from "../page/addFoodConsumption/AddFoodConsumptionPage";
import {getCurrentItem, getCurrentPantry, getCurrentTransaction, getUser} from "../selector/Selector";
import {getCurrentItem, getCurrentPantry, getCurrentTransaction} from "../selector/Selector";
import {Transaction} from "../model/transaction";
import {format} from "date-fns";
import {useTransactionList} from "../hooks/useTransactionList";
Expand All @@ -13,7 +13,6 @@ import {strings} from "../localization/strings";
const ChooseFoodTransactionComponent = (props: StepperComponentProps) => {
const dispatch = useDispatch();
const currentFood = useSelector(getCurrentItem);
const currentUser = useSelector(getUser);
const currentPantry = useSelector(getCurrentPantry);
const currentTransaction = useSelector(getCurrentTransaction);
const transactionList = useTransactionList(currentPantry?.id || "", currentFood?.id || "", true);
Expand Down
2 changes: 1 addition & 1 deletion src/page/itemTransaction/ItemTransactionPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function ItemTransactionPage() {
const currentItem = useSelector(getCurrentItem);
const currentPantry = useSelector(getCurrentPantry);
const itemTransactionList = useTransactionList(currentPantry?.id || "", currentItem?.id || "", false);
const itemDetails = useItemDetail(currentPantry?.id || "", currentPantry?.id || "");
const itemDetails = useItemDetail(currentItem?.id || "", currentPantry?.id || "");

const goToAddTransactionPage = () => {
navigate(`/item/${currentItem?.id}/transaction/add`);
Expand Down

0 comments on commit 238cba0

Please sign in to comment.