import { useState } from 'react' import { COMPANIES } from '../lib/companies' import { VX_SERVER } from '../lib/webrtc' const DEFAULT_KEY = 'vk_Qg95CQBuNFuiiHMCVtgo9bh9kx0N1ACnaj8zdJyg5qsBDWTjxt2ZoegM2UCdKfCY' export default function Lobby({ onJoin }) { const [name, setName] = useState('Ayush') const [company, setCompany] = useState(null) const [apiKey] = useState(DEFAULT_KEY) const [server] = useState(VX_SERVER) const [error, setError] = useState('') const [loading, setLoading] = useState(false) async function handleStart() { if (!name.trim()) return setError('Enter your name') if (!company) return setError('Choose a company to interview for') if (!apiKey.trim()) return setError('Enter your API key') if (!server.trim()) return setError('Enter the server address') setError('') setLoading(true) await onJoin({ name: name.trim(), company: COMPANIES[company], apiKey: apiKey.trim(), server: server.trim() }) setLoading(false) } function handleKey(e) { if (e.key === 'Enter' && !loading) handleStart() } return (
AI-powered mock interview
Pick a company. Start talking. Get honest feedback — on your answers and your presence.
{/* name */}{error}
}Your camera and microphone will be used. Everything stays in session.