mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-17 18:10:47 -04:00
voice setup slopcoding
This commit is contained in:
@@ -8,6 +8,7 @@ import useDefaultNickname from '../../hooks/useDefaultNickname.js';
|
||||
import useUserIdentitySync from '../../hooks/useUserIdentitySync.js';
|
||||
import SocketConnectionPill from '../../components/SocketConnectionPill/index.jsx';
|
||||
import useScannerSpeech from './useScannerSpeech.js';
|
||||
import ScannerVoiceSetup from './ScannerVoiceSetup.jsx';
|
||||
|
||||
const EMPTY_SCANNER_STATE = {
|
||||
beepAllowed: false,
|
||||
@@ -43,6 +44,7 @@ function playSubmitBeep() {
|
||||
|
||||
export default function ScannerContent() {
|
||||
const socket = useSocket();
|
||||
const setupMode = new URLSearchParams(window.location.search).get('setup') === 'voice';
|
||||
const inputRef = useRef(null);
|
||||
const flashTimerRef = useRef(null);
|
||||
const [scannerState, setScannerState] = useState(EMPTY_SCANNER_STATE);
|
||||
@@ -112,6 +114,10 @@ export default function ScannerContent() {
|
||||
const lastScan = scannerState.lastScan;
|
||||
const label = lastScan?.label || 'waiting';
|
||||
|
||||
if (setupMode) {
|
||||
return <ScannerVoiceSetup />;
|
||||
}
|
||||
|
||||
return (
|
||||
<main
|
||||
className={`flex min-h-screen cursor-default flex-col items-center justify-center overflow-hidden px-6 text-center ${
|
||||
|
||||
Reference in New Issue
Block a user