fix last issues
This commit is contained in:
parent
497c556a87
commit
7dd17798c4
7 changed files with 20 additions and 17 deletions
|
|
@ -1,11 +1,14 @@
|
|||
import { FontAwesome } from "@expo/vector-icons";
|
||||
import { router, useLocalSearchParams } from "expo-router";
|
||||
import { FlatList, SafeAreaView, StyleSheet, Text, TouchableOpacity, View } from "react-native";
|
||||
import { useRouter, useLocalSearchParams } from "expo-router";
|
||||
import { FlatList, StyleSheet, Text, TouchableOpacity, View } from "react-native";
|
||||
import { ExpenseItem, LoadingSymbol, TextInputBar } from "../../../components";
|
||||
|
||||
import useFetch from "../../../hooks/useFetch";
|
||||
import { useTheme } from "../../contexts/ThemeContext";
|
||||
import { SafeAreaView } from "react-native-safe-area-context";
|
||||
|
||||
export default function Page() {
|
||||
const router = useRouter();
|
||||
const {colors} = useTheme();
|
||||
const {category_guid} = useLocalSearchParams();
|
||||
|
||||
|
|
@ -14,7 +17,7 @@ export default function Page() {
|
|||
const {data, isLoading, reFetch} = useFetch({sql: "SELECT e.guid AS expense_guid, e.name AS expense_name, c.name AS category_name, e.datetime AS expense_datetime, e.amount AS expense_amount, c.color AS category_color FROM expense e JOIN category c ON e.category_guid = c.guid WHERE c.guid = ? ORDER BY expense_datetime desc;", args: [category_guid]});
|
||||
|
||||
const handleEditCategory = () => {
|
||||
router.push({pathname: "/(tabs)/budget/editCategory", params: {category_guid: category_guid, category_color: category_color, category_amount: category_amount, category_name: category_name, category_type: category_type}});
|
||||
router.push({pathname: "/budget/editCategory", params: {category_guid: category_guid, category_color: category_color, category_amount: category_amount, category_name: category_name, category_type: category_type}});
|
||||
}
|
||||
|
||||
const handleBackButton = () => {
|
||||
|
|
@ -45,6 +48,7 @@ export default function Page() {
|
|||
title={item.expense_name}
|
||||
date={item.expense_datetime}
|
||||
value={item.expense_amount}
|
||||
onPress={()=>router.push(`/home/expense/${item.guid}`)}
|
||||
/>}
|
||||
keyExtractor={item => item.guid}
|
||||
ItemSeparatorComponent={() => {
|
||||
|
|
|
|||
Reference in a new issue