implemented plus button on budget screen and routing for the plus button

This commit is contained in:
thschleicher 2024-01-02 10:14:36 +01:00 committed by Jakob Stornig
parent 85c737e66c
commit 6ee1c01d6a
6 changed files with 45 additions and 16 deletions

View file

@ -6,6 +6,7 @@ export type CategoryItemProps = {
category: string,
color: ColorValue,
allocated_ammount: number,
total_expenses: number,
category_guid: string,
}
@ -13,7 +14,7 @@ const CategoryItem = (properties: CategoryItemProps) => {
const { colors } = useTheme();
const subText = `${calculateSumOfExpenses(properties.category_guid)} / ${properties.allocated_ammount}`;
const subText = `${properties.total_expenses} / ${properties.allocated_ammount}`;
return (
<CustomCard>
@ -53,13 +54,3 @@ const styles = StyleSheet.create({
fontSize: 17.5,
}
})
const calculateSumOfExpenses = (category_guid: string) => {
// const { data } = useFetch({sql: "SELECT amount FROM expense WHERE category_guid = ?", args: [category_guid]});
// let sum: number = 0;
// console.log(data);
console.log("render");
return 0;
}