graph works + unmount on blur
This commit is contained in:
parent
4b06a217c5
commit
0e22e63ce9
2 changed files with 15 additions and 20 deletions
|
|
@ -1,30 +1,24 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { SafeAreaView } from 'react-native';
|
import { SafeAreaView } from 'react-native';
|
||||||
import { Graph } from '../../../components';
|
import { Graph } from '../../../components';
|
||||||
|
import BudgetOverview from '../../../components/stats/BudgetOverview';
|
||||||
|
import BudgetRemaining from '../../../components/stats/BudgetRemaining';
|
||||||
|
import SavingsOverview from '../../../components/stats/SavingsOverview';
|
||||||
|
import Widget from '../../../components/stats/Widget';
|
||||||
|
|
||||||
export default function Page() {
|
export default function Page() {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SafeAreaView style={{flex: 1}}>
|
<SafeAreaView style={{flex: 1}}>
|
||||||
|
<Widget title="Budget Overview"/>
|
||||||
<Graph/>
|
<Graph/>
|
||||||
|
|
||||||
|
|
||||||
{/* <DebugMenu />
|
|
||||||
<Widget title='"Financial" Tips' backgroundColor='orange'>
|
|
||||||
<FinancialAdvice/>
|
|
||||||
</Widget>
|
|
||||||
<Widget title="Budget Overview" />
|
|
||||||
<Widget>
|
|
||||||
<BudgetRemaining/>
|
<BudgetRemaining/>
|
||||||
</Widget>
|
|
||||||
<Widget title='Your Expenses so far' image={require('../../../assets/images/8b14el.jpg')}/>
|
|
||||||
<Widget>
|
<Widget>
|
||||||
<BudgetOverview/>
|
<BudgetOverview/>
|
||||||
</Widget>
|
</Widget>
|
||||||
<Widget>
|
<Widget>
|
||||||
<SavingsOverview/>
|
<SavingsOverview/>
|
||||||
</Widget> */}
|
</Widget>
|
||||||
</SafeAreaView>
|
</SafeAreaView>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,9 @@ import { StyleSheet } from "react-native";
|
||||||
|
|
||||||
import { FontAwesome } from "@expo/vector-icons";
|
import { FontAwesome } from "@expo/vector-icons";
|
||||||
import { Redirect } from "expo-router";
|
import { Redirect } from "expo-router";
|
||||||
import React, { useEffect } from "react";
|
import React from "react";
|
||||||
import { useTheme } from "../contexts/ThemeContext";
|
|
||||||
import { useAuth } from "../contexts/AuthContext";
|
import { useAuth } from "../contexts/AuthContext";
|
||||||
|
import { useTheme } from "../contexts/ThemeContext";
|
||||||
|
|
||||||
export default function Layout() {
|
export default function Layout() {
|
||||||
const {authState} = useAuth()
|
const {authState} = useAuth()
|
||||||
|
|
@ -52,6 +52,7 @@ export default function Layout() {
|
||||||
<Tabs.Screen name="(stats)/index" options={
|
<Tabs.Screen name="(stats)/index" options={
|
||||||
{
|
{
|
||||||
tabBarLabel: "Stats",
|
tabBarLabel: "Stats",
|
||||||
|
unmountOnBlur: true,
|
||||||
tabBarIcon: ({size, color}) => (
|
tabBarIcon: ({size, color}) => (
|
||||||
<FontAwesome name="bar-chart" size={size} color={color}/>),
|
<FontAwesome name="bar-chart" size={size} color={color}/>),
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Reference in a new issue