mirror of
https://github.com/urosran/cally.git
synced 2025-11-26 08:24:55 +00:00
- Fixed issue with adding new grocery item but without a category always
This commit is contained in:
@ -116,6 +116,10 @@ const EditGroceryItem = ({ editGrocery }: { editGrocery: IEditGrocery }) => {
|
||||
});
|
||||
console.log("kategorija vo diropdown: " + item.value);
|
||||
if (editGrocery.closeEdit) editGrocery.closeEdit(false);
|
||||
} else {
|
||||
if (editGrocery.setCategory) {
|
||||
editGrocery.setCategory(item.value);
|
||||
}
|
||||
}
|
||||
}}
|
||||
/>
|
||||
|
||||
@ -32,6 +32,7 @@ const GroceryList = () => {
|
||||
const [category, setCategory] = useState<GroceryCategory>(
|
||||
GroceryCategory.None
|
||||
);
|
||||
|
||||
const [title, setTitle] = useState<string>("");
|
||||
const [submit, setSubmitted] = useState<boolean>(false);
|
||||
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
import { createContext, FC, ReactNode, useContext, useState } from "react";
|
||||
import {IToDo} from "@/hooks/firebase/types/todoData";
|
||||
import {useGetGroceries} from "@/hooks/firebase/useGetGroceries";
|
||||
import {useGetTodos} from "@/hooks/firebase/useGetTodos";
|
||||
import {useCreateGrocery} from "@/hooks/firebase/useCreateGrocery";
|
||||
import {useCreateTodo} from "@/hooks/firebase/useCreateTodo";
|
||||
import {useUpdateTodo} from "@/hooks/firebase/useUpdateTodo";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user