From c0a70a0ed5c50d9ea7e2b0bb45bd2fec74b29a44 Mon Sep 17 00:00:00 2001 From: Walcher Date: Fri, 5 Jan 2024 14:52:20 +0100 Subject: [PATCH] finishing up --- app/(tabs)/stats/index.tsx | 26 ++++---------------------- components/stats/Widget.tsx | 1 + 2 files changed, 5 insertions(+), 22 deletions(-) diff --git a/app/(tabs)/stats/index.tsx b/app/(tabs)/stats/index.tsx index 11f17fc..cac1e04 100644 --- a/app/(tabs)/stats/index.tsx +++ b/app/(tabs)/stats/index.tsx @@ -18,25 +18,7 @@ export default function Page() { const spent = 120.75; const budget = 696.96; - const BudgetData = [ - { name: 'Utilities', color: '#20B2AA', maxValue: 80, currentValue: 46 }, - { name: 'Food', color: '#FF6347', maxValue: 88, currentValue: 31 }, - ]; - - const SavingsData = [ - { name: 'Education', color: '#FF6347', maxValue: 135, currentValue: 0 }, - { name: 'Rent', color: '#DA70D6', maxValue: 140, currentValue: 96 }, - { name: 'Food', color: '#F08080', maxValue: 84, currentValue: 78 }, - { name: 'Healthcare', color: '#20B2AA', maxValue: 134, currentValue: 48 }, - { name: 'Healthcare', color: '#32CD32', maxValue: 119, currentValue: 69 }, - { name: 'Clothing', color: '#32CD32', maxValue: 115, currentValue: 99 }, - ]; - - const categoryData = [ - { category: 'Food', value: 50 }, - { category: 'Rent', value: 300 }, - { category: 'Utilities', value: 100 }, - ]; + const styles = StyleSheet.create({ container: { @@ -51,6 +33,9 @@ export default function Page() { + + + @@ -59,9 +44,6 @@ export default function Page() { - - - diff --git a/components/stats/Widget.tsx b/components/stats/Widget.tsx index 182def4..3162d62 100644 --- a/components/stats/Widget.tsx +++ b/components/stats/Widget.tsx @@ -13,6 +13,7 @@ interface WidgetProps { const Widget: React.FC = ({ title, text, children, image, backgroundColor }) => { const { colors } = useTheme(); + const actualBackgroundColor = backgroundColor ? backgroundColor : colors.widgetBackgroundColor; const styles = StyleSheet.create({