refactored into budgetHeader component
This commit is contained in:
parent
7c165fb691
commit
94e9b5738e
3 changed files with 43 additions and 9 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import { SafeAreaView, StyleSheet, Text, View } from 'react-native';
|
||||
import { SafeAreaView, StyleSheet, View } from 'react-native';
|
||||
import { FlatList } from 'react-native-gesture-handler';
|
||||
import { SearchBar } from '../../../components';
|
||||
import { BudgetHeader } from '../../../components';
|
||||
import CategoryItem from '../../../components/budget/categoryItem';
|
||||
import useFetch from '../../../hooks/useFetch';
|
||||
import { useThemeColor } from '../../../hooks/useThemeColor';
|
||||
|
|
@ -14,11 +14,9 @@ export default function Page() {
|
|||
|
||||
return (
|
||||
<SafeAreaView style={[styles.safeAreaViewStyle, {backgroundColor: containerColor}]}>
|
||||
<View>
|
||||
<Text style={[{color: textColor}]}>Expense View</Text>
|
||||
<SearchBar placeholder='Search...'></SearchBar>
|
||||
</View>
|
||||
|
||||
|
||||
<BudgetHeader/>
|
||||
|
||||
<FlatList
|
||||
data={data}
|
||||
renderItem = {({item}) => <CategoryItem category={item.category_name} allocated_account={100} color={item.category_color}/>}
|
||||
|
|
@ -37,5 +35,5 @@ const styles = StyleSheet.create({
|
|||
},
|
||||
itemSeperatorStyle: {
|
||||
marginVertical: 5,
|
||||
}
|
||||
},
|
||||
});
|
||||
Reference in a new issue