airboardgame/src/App.js

32 lines
678 B
JavaScript
Raw Normal View History

import React from 'react';
import './App.css';
2020-06-05 22:58:53 +02:00
import { Provider } from '@scripters/use-socket.io';
import Board from './views/Board';
import { C2CProvider } from './hooks/useC2C';
import { RecoilRoot } from 'recoil';
const SOCKET_URL = process.env.REACT_APP_SOCKET_URL || 'http://localhost:4000';
const SOCKET_OPTIONS = {
forceNew: true,
};
const room = 'test';
function App() {
return (
2020-06-05 22:58:53 +02:00
<RecoilRoot>
<Provider url={SOCKET_URL} options={SOCKET_OPTIONS}>
<C2CProvider room={room}>
<div className='App'>
<Board room={room} />
</div>
</C2CProvider>
</Provider>
</RecoilRoot>
);
}
export default App;