Resolve "implement updating a category"

This commit is contained in:
Thomas Schleicher 2024-01-05 19:56:55 +00:00
parent 0ddfe3e606
commit d7bb318c24
6 changed files with 25 additions and 14 deletions

View file

@ -2,6 +2,7 @@ import { router, useLocalSearchParams } from "expo-router";
import { useState } from "react";
import { SafeAreaView, StyleSheet, Text, TextInput, View } from "react-native";
import { AutoDecimalInput, CustomColorPicker, NavigationButton, TypeSelectorSwitch } from "../../../components";
import { updateCategory } from "../../../services/database";
import { useTheme } from "../../contexts/ThemeContext";
const addCategory = () => {
@ -48,7 +49,7 @@ const addCategory = () => {
router.back();
}}/>
<NavigationButton text="Save" onPress={() => {
console.log("Implement Saving here!");
updateCategory(category_guid.toString(), categoryName, categoryColor, selectedType, amount);
router.back();
}}/>
</View>