refactor: update tab bar icons size, enhance QR scan modal layout, and remove unused icons

This commit is contained in:
2026-09-10 17:32:48 +02:00
parent b27a660eef
commit 5a6006e2d2
10 changed files with 74 additions and 48 deletions
+15 -4
View File
@@ -10,9 +10,11 @@ import React, { useEffect, useState } from 'react';
import { RefreshControl, ScrollView, Text, TouchableOpacity, View } from 'react-native';
import NfcManager from 'react-native-nfc-manager';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useLocalSearchParams } from 'expo-router';
export default function AttendanceScreen() {
const [scannerType, setScannerType] = useState<'qr' | 'nfc'>('qr');
const { autoScan } = useLocalSearchParams();
const alert = useAlert();
const [showScanner, setShowScanner] = useState(false);
const [lastScan, setLastScan] = useState<{ type: string; time: string; site: string } | null>(null);
@@ -47,10 +49,19 @@ export default function AttendanceScreen() {
};
useEffect(() => {
checkNfcAvailability();
fetchAttendances();
setLastScan(null);
}, []);
const init = async () => {
await checkNfcAvailability();
fetchAttendances();
setLastScan(null);
if (autoScan === 'true') {
setTimeout(() => {
handleStartScan();
}, 300);
}
};
init();
}, [autoScan]);
const onRefresh = () => {
setRefreshing(true);