diff --git a/lstMobile/src/app/(tabs)/logout.tsx b/lstMobile/src/app/(tabs)/logout.tsx new file mode 100644 index 0000000..2e18a2f --- /dev/null +++ b/lstMobile/src/app/(tabs)/logout.tsx @@ -0,0 +1,3 @@ +export default function LogoutScreen() { + return null; +} diff --git a/lstMobile/src/app/_layout.tsx b/lstMobile/src/app/_layout.tsx index 8d4d2ac..67c0963 100644 --- a/lstMobile/src/app/_layout.tsx +++ b/lstMobile/src/app/_layout.tsx @@ -5,12 +5,15 @@ import "../../global.css"; import { useEffect } from "react"; import Toast from "react-native-toast-message"; import useDeviceLock from "../hooks/useDeviceCheck"; +import { connectSocket } from "../lib/socket.io"; import { zebraScanner } from "../lib/ZebraScanner"; export default function RootLayout() { useDeviceLock(); + useEffect(() => { zebraScanner.ensureProfile(); + connectSocket(); }, []); return ( diff --git a/lstMobile/src/components/LSTScanner.tsx b/lstMobile/src/components/LSTScanner.tsx index 1625160..074cdb5 100644 --- a/lstMobile/src/components/LSTScanner.tsx +++ b/lstMobile/src/components/LSTScanner.tsx @@ -182,14 +182,17 @@ export default function LSTScanner() { }, [handleScan]), ); return ( - - - - User: {formatName(user?.name ?? "")} - - - LST Scanner id: {user?.scannerId} - + + + + + Lst user: {formatName(user?.name ?? "")} + + {/* + LST Scanner id: {user?.scannerId} + */} + + {!lastScan ? ( - - Ready to scan + + Ready to scan Please Scan a command to start scanning... Scanning a label could cause errors due to incorrect previous @@ -208,7 +211,7 @@ export default function LSTScanner() { ) : ( @@ -217,10 +220,10 @@ export default function LSTScanner() { .map((i) => { return ( - + {i} @@ -237,18 +240,17 @@ export default function LSTScanner() { color={bgColor} clearScan={clearScans} /> + - + {/* {user && (