import { h, render } from 'preact'
import { Provider } from 'react-redux'
import { BrowserRouter, Route } from 'react-router-dom'
// import client from './client'

import { store, history } from './store'
import socket from './socket'

import Header from './common/header.component'
import Dashboard from './dashboard/dashboard.component'
import LivePix2Pix from './pix2pix'

const app = (
  <Provider store={store}>
    <BrowserRouter>
      <div>
        <Route exact path='/' component={Dashboard} />
        <Route exact path='/live/' component={LivePix2Pix} />
        <Route exact path='/dashboard/' component={Dashboard} />
        <Header />
      </div>
    </BrowserRouter>
  </Provider>
)

render(app, document.getElementById('container'))
