import { View, Text, ScrollView, StyleSheet, Pressable } from 'react-native'; import React, { useEffect } from 'react'; import { SafeAreaView } from 'react-native-safe-area-context'; import NormalButton from '../global/normal_button'; import { router, useLocalSearchParams, useNavigation } from 'expo-router'; import { BatteryIconSvg, BatteryLogoSvg, DownArrowSvg, LightingLogoSvg, TemperatureIconSvg, TickLogoSvg, TimeClockLogoSvg, UpArrowSvg } from '../global/SVG'; import useBookingStore from '../../providers/booking_store'; import userStore from '../../providers/user_store'; const PaymentFinishPageComponent = () => { const { bookTime, carID, date, chargingWatt, connectorID, price, stationID, user, paymentFee, carCapacitance } = useBookingStore(); const navigation = useNavigation(); useEffect(() => { navigation.setOptions({ gestureEnabled: false }); }, [navigation]); // const [isMoreInfoButtonPressed, setIsMoreInfoButtonPressed] = // React.useState(false); const params = useLocalSearchParams(); const formatOrderId = params.formatOrderId; return ( 成功付款 {/* TESLA Model 3 已充電 95% 充電歷時 39 mins {isMoreInfoButtonPressed ? ( <> 充電功率 22.1kW 實際功率 30.0kW 溫度 36°c { setIsMoreInfoButtonPressed( !isMoreInfoButtonPressed ); }} style={{ padding: 2 }} > 收起{' '} ) : ( { setIsMoreInfoButtonPressed( !isMoreInfoButtonPressed ); }} style={{ padding: 2 }} > 更多資訊{' '} )} */} {/* 時間日期 3月14 · 16:15 充電地點 上環街市充電站 香港上環皇后大道中345號 方案 按每度電結算 度數: 50kWh 車輛 TESLA Model 3 */} 收費概要 充電費用 HK$ {paymentFee} {chargingWatt === '' ? ( 充滿停機預估費用 ) : ( 按每度電結算: {chargingWatt.split('~')[0]} )} 總計 HK$ {paymentFee} 付款資訊 訂單編號 {formatOrderId} 付款方式 預付銀包 {/* 電郵地址 mikechan123@.com */} 下一頁} onPress={() => { // router.replace('bookingSuccessPage'); router.replace({ pathname: 'bookingSuccessPage', params: { formatOrderId: formatOrderId } }); }} /> ); }; export default PaymentFinishPageComponent; const styles = StyleSheet.create({ grayColor: { color: '#888888' }, greenColor: { color: '#02677D' } });