// component/chargingPage/paymentFinishPageComponent.tsx 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'; import { useTranslation } from '../../util/hooks/useTranslation'; const PaymentFinishPageComponent = () => { const { t } = useTranslation(); 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 ( {t('payment_finish.success_title')} {t('payment_finish.fee_summary')} {t('payment_finish.charging_fee')} HK$ {paymentFee} {chargingWatt === '' ? ( {t('payment_finish.estimated_full_charge')} ) : ( {t('payment_finish.settled_per_kwh')}{chargingWatt.split('~')[0]} )} {t('payment_finish.total')} HK$ {paymentFee} {t('payment_finish.payment_info')} {t('payment_finish.order_number')} {formatOrderId} {t('payment_finish.payment_method')} {t('payment_finish.prepaid_wallet')} {t('common.nextPage')}} onPress={() => { // router.replace('bookingSuccessPage'); router.replace({ pathname: 'bookingSuccessPage', params: { formatOrderId: formatOrderId } }); }} /> ); }; export default PaymentFinishPageComponent; const styles = StyleSheet.create({ grayColor: { color: '#888888' }, greenColor: { color: '#02677D' } });