|
|
@@ -52,8 +52,6 @@ const HomePage: React.FC<HomePageProps> = () => {
|
|
|
const [isLoadingReservations, setIsLoadingReservations] = useState(true);
|
|
|
const [unreadCount, setUnreadCount] = useState(0);
|
|
|
|
|
|
- const [passingThisPromotionToBell, setPassingThisPromotionToBell] = useState<any>([]);
|
|
|
-
|
|
|
useEffect(() => {
|
|
|
const fetchIDandCheckLicensePlate = async () => {
|
|
|
try {
|
|
|
@@ -143,14 +141,6 @@ const HomePage: React.FC<HomePageProps> = () => {
|
|
|
Alert.alert('Error fetching reservations:', results[0].reason);
|
|
|
}
|
|
|
|
|
|
- // Handle promotion data
|
|
|
- if (results[1].status === 'fulfilled') {
|
|
|
- const passingThisPromotionToBell = results[1].value.filter((p: any) => p.is_show);
|
|
|
- setPassingThisPromotionToBell(passingThisPromotionToBell);
|
|
|
- } else if (results[1].status === 'rejected') {
|
|
|
- Alert.alert('Error fetching promotions:', results[1].reason);
|
|
|
- }
|
|
|
-
|
|
|
// Get viewed notifications
|
|
|
const viewedNotifications = await notificationStorage.getViewedNotifications();
|
|
|
|
|
|
@@ -267,7 +257,6 @@ const HomePage: React.FC<HomePageProps> = () => {
|
|
|
<NormalButton
|
|
|
title={<Text className="text-white text-sm lg:text-lg">確定</Text>}
|
|
|
onPress={() => {
|
|
|
- console.log('licensePlate', licensePlate);
|
|
|
//here when users click confirm, i want to pop another modal that say you have entered "xxxxxx", click confirm to continue
|
|
|
if (!licensePlate.trim()) {
|
|
|
Alert.alert('請輸入車牌號碼');
|
|
|
@@ -331,14 +320,7 @@ const HomePage: React.FC<HomePageProps> = () => {
|
|
|
<View className="relative z-5">
|
|
|
<Pressable
|
|
|
onPress={() =>
|
|
|
- router.push({
|
|
|
- pathname: 'notificationPage',
|
|
|
- params: {
|
|
|
- reservationAfter2025: JSON.stringify(reservationAfter2025),
|
|
|
- passingThisPromotionToBell:
|
|
|
- JSON.stringify(passingThisPromotionToBell)
|
|
|
- }
|
|
|
- })
|
|
|
+ router.push({pathname: 'notificationPage'})
|
|
|
}
|
|
|
disabled={isLoadingReservations}
|
|
|
className="z-10 w-10 items-center justify-center"
|
|
|
@@ -414,23 +396,7 @@ const HomePage: React.FC<HomePageProps> = () => {
|
|
|
padding: 24
|
|
|
}}
|
|
|
/>
|
|
|
- </View> */}
|
|
|
- <View className="flex-1">
|
|
|
- <NormalButton
|
|
|
- // onPress={() => console.log('掃瞄及充電')}
|
|
|
- onPress={() => router.push('vipQrPage')}
|
|
|
- title={
|
|
|
- <View className="flex flex-row items-center space-x-2">
|
|
|
- <VipCodeIconSvg />
|
|
|
- <Text className="text-white font-bold text-lg ml-2">專屬會員二維碼</Text>
|
|
|
- </View>
|
|
|
- }
|
|
|
- extendedStyle={{
|
|
|
- alignItems: 'flex-start',
|
|
|
- padding: 24
|
|
|
- }}
|
|
|
- />
|
|
|
- </View>
|
|
|
+ </View> */}
|
|
|
<View className="flex-1">
|
|
|
<NormalButton
|
|
|
onPress={() => router.push('/(account)/(wallet)/walletPage')}
|
|
|
@@ -447,7 +413,7 @@ const HomePage: React.FC<HomePageProps> = () => {
|
|
|
/>
|
|
|
</View>
|
|
|
</View>
|
|
|
- {/* <View className="mt-4">
|
|
|
+ <View className="mt-4">
|
|
|
<NormalButton
|
|
|
// onPress={() => console.log('掃瞄及充電')}
|
|
|
onPress={() => router.push('vipQrPage')}
|
|
|
@@ -462,7 +428,7 @@ const HomePage: React.FC<HomePageProps> = () => {
|
|
|
padding: 24
|
|
|
}}
|
|
|
/>
|
|
|
- </View> */}
|
|
|
+ </View>
|
|
|
</View>
|
|
|
</ScrollView>
|
|
|
</SafeAreaView>
|