import React from 'react';
import logo from './logo.svg';
import './App.css';
import useVoice from './Wrappers/voice';
import { voiceToken } from './Wrappers/default-config';

const App = () => {
	const { startDevice, answer, hangup, voiceState } = useVoice();
	
	window.setTimeout(() => startDevice(voiceToken), 5000);

	return (
		<div className="App">
			<header className="App-header">
				<img src={logo} className="App-logo" alt="logo" />
				<p>
					Device is currently {voiceState.deviceState}.
				</p>
			</header>
		</div>
	);
}

export default App;
