fix last issues
This commit is contained in:
parent
497c556a87
commit
7dd17798c4
7 changed files with 20 additions and 17 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import { View, Text, Alert, StyleSheet } from 'react-native'
|
||||
import React, { useEffect, useState } from 'react'
|
||||
import { router, useLocalSearchParams } from 'expo-router'
|
||||
import { router, useLocalSearchParams, useRouter } from 'expo-router'
|
||||
import useFetch from '../../../../hooks/useFetch';
|
||||
import { Category, Expense } from '../../../../types/dbItems';
|
||||
import { CategorySelectorModal, AutoDecimalInput, CategorySelector, TextInputBar, DateSelectorButton, RoundedButton } from '../../../../components';
|
||||
|
|
@ -12,6 +12,7 @@ import { SIZES } from '../../../../constants/theme';
|
|||
import { useTheme } from '../../../contexts/ThemeContext';
|
||||
|
||||
export default function Page() {
|
||||
const router = useRouter();
|
||||
const {colors} = useTheme();
|
||||
const {expense} = useLocalSearchParams();
|
||||
const {data, isEmptyResult} = useFetch({sql: "SELECT e.guid as e_guid, e.name as e_name, e.datetime as e_datetime, e.amount as e_amount, c.guid as c_guid, c.name as c_name, c.color as c_color FROM expense e INNER JOIN category c on e.category_guid = c.guid WHERE e.guid = ?", args: [expense]});
|
||||
|
|
@ -24,6 +25,8 @@ export default function Page() {
|
|||
const [datePickerShown, setDatePickerShown] = useState<boolean>(false);
|
||||
const [selectedDate, setSelectedDate] = useState<Date>(new Date());
|
||||
|
||||
|
||||
console.log(router.canGoBack())
|
||||
useEffect(()=>{
|
||||
const entry = data[0];
|
||||
console.log(entry)
|
||||
|
|
|
|||
Reference in a new issue