call API trip

This commit is contained in:
2025-11-05 23:47:54 +07:00
parent 62b18e5bc0
commit 6288e79622
7 changed files with 115 additions and 3 deletions

View File

@@ -1,4 +1,5 @@
import { IconSymbol } from "@/components/ui/icon-symbol";
import { useTrip } from "@/state/use-trip";
import React, { useRef, useState } from "react";
import { Animated, Text, TouchableOpacity, View } from "react-native";
import TripCostDetailModal from "./modal/TripCostDetailModal";
@@ -64,6 +65,7 @@ const TripCostTable: React.FC = () => {
const [modalVisible, setModalVisible] = useState(false);
const animatedHeight = useRef(new Animated.Value(0)).current;
const tongCong = data.reduce((sum, item) => sum + item.tongChiPhi, 0);
const { trip, getTrip } = useTrip();
const handleToggle = () => {
const toValue = collapsed ? contentHeight : 0;
@@ -95,6 +97,8 @@ const TripCostTable: React.FC = () => {
// marginBottom: 12,
}}
>
{/* {trip && <Text></Text>} */}
<Text style={styles.title}>Chi phí chuyến đi</Text>
{collapsed && (
<Text