stub react pages structure

This commit is contained in:
Sorrel Bri 2020-01-08 11:38:09 -08:00
parent 7e2156ff06
commit a4546a8ef5

View file

@ -2,6 +2,8 @@ import React, {useState} from 'react';
import './App.scss'; import './App.scss';
import config from './config'; import config from './config';
import { Switch, Route } from 'react-router-dom';
import socketIOClient from 'socket.io-client'; import socketIOClient from 'socket.io-client';
export const socket = socketIOClient(config.apiAddress); export const socket = socketIOClient(config.apiAddress);
@ -16,6 +18,17 @@ function App() {
<h1>React Boilerplate</h1> <h1>React Boilerplate</h1>
{fetchData ? <p>{fetchData}</p> : <></>} {fetchData ? <p>{fetchData}</p> : <></>}
{socketData ? <p>{socketData}</p> : <></>} {socketData ? <p>{socketData}</p> : <></>}
<Switch>
<Route path="/" exact>
<p>Index</p>
</Route>
<Route path="/game">
<p>Game</p>
</Route>
</Switch>
</div> </div>
); );
} }