last changes

This commit is contained in:
Jakob Stornig 2024-01-25 20:35:09 +01:00
parent 7a5ace403e
commit 899b50ded4
16 changed files with 53 additions and 89 deletions

View file

@ -54,9 +54,7 @@ export default function AddItem() {
useEffect(()=>{
if(searchParams.category !== undefined){
console.log(searchParams.category)
executeQuery({sql: "SELECT * FROM category WHERE guid = ?", args: [searchParams.category]}).then((result) =>{
console.log("then")
if("rows" in result[0]){
const category = result[0]["rows"][0];
setSelectedCategory({name: category["name"], color: category["color"], guid: category["guid"]})