Restructure project to root layout
This commit is contained in:
1 parent
e0e26a34ab
commit
3ffe9bbf99
51 files changed
+16
-12
No files matched your search
@@ -0,0 +1,21 @@
|
||||
import { Container, Typography } from '@mui/material';
|
||||
import { useState } from 'react';
|
||||
import { BarcodeScannerView } from '../components/BarcodeScannerView';
|
||||
|
||||
export const BarcodeScannerScreen = () => {
|
||||
const [lastCode, setLastCode] = useState('');
|
||||
|
||||
return (
|
||||
<Container sx={{ py: 4 }}>
|
||||
<Typography variant="h5" gutterBottom>
|
||||
Barcode Scanner
|
||||
</Typography>
|
||||
<BarcodeScannerView onDetected={(code) => setLastCode(code)} />
|
||||
{lastCode ? (
|
||||
<Typography variant="body2" color="text.secondary" sx={{ mt: 2 }}>
|
||||
Last detected: {lastCode}
|
||||
</Typography>
|
||||
) : null}
|
||||
</Container>
|
||||
);
|
||||
};
|
||||
Reference in new issue
Block a user