import { View, Text, ScrollView, Image, useWindowDimensions, StyleSheet, Pressable } from 'react-native'; import React from 'react'; import { SceneMap, TabBar, TabView } from 'react-native-tab-view'; import NormalButton from '../global/normal_button'; import { router } from 'expo-router'; import { CheckMarkLogoSvg, DirectionLogoSvg, PreviousPageSvg } from '../global/SVG'; import { SafeAreaView } from 'react-native-safe-area-context'; interface ChargingStationTabViewProps { titles: string[]; } const ChargingStationTabView: React.FC = ({ titles }) => { const layout = useWindowDimensions(); //tab 1 const FirstRoute = () => ( 這是一段有關充電站的說明 ); //tab 2 const SecondRoute = () => ( Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident ); const renderScene = SceneMap({ firstRoute: FirstRoute, secondRoute: SecondRoute }); const [routes] = React.useState([ { key: 'firstRoute', title: titles[0] }, { key: 'secondRoute', title: titles[1] } ]); const [index, setIndex] = React.useState(0); const renderTabBar = (props: any) => ( ( {route.title} )} indicatorStyle={{ backgroundColor: '#000000', height: 1 }} style={{ backgroundColor: 'white', elevation: 0, marginHorizontal: 15, borderBottomWidth: 0.5 }} /> ); return ( ); }; const ResultDetailPageComponent = () => { return ( { if (router.canGoBack()) { router.back(); } else { router.replace('./'); } }} > 上環街市充電站 香港上環皇后大道中345號 路線 } onPress={() => console.log('路線')} extendedStyle={{ backgroundColor: '#E3F2F8', borderRadius: 61, paddingHorizontal: 30, paddingVertical: 10 }} /> Walk-In 400米 + 新增預約 } // onPress={() => console.log('ab')} onPress={()=>router.push('makingBookingPage')} extendedStyle={{ flex: 0.5 }} /> 收費 $20 每15分鐘 $3.5 每度電 充電站資訊 ); }; export default ResultDetailPageComponent; const styles = StyleSheet.create({ text: { fontWeight: 300, color: '#000000' } });