import { h, Component } from 'preact'
import { isMobile } from '../vendor/util'
// import db from '../db'

import Header from './UI/Header.jsx'
import Browser from './Browser/Browser.jsx'
import Tasks from './Tasks/Tasks.jsx'

import client from '../client'

var socket = io(window.location.origin)

socket.on('connect', (data) => {
  console.log('connected')
})
socket.on('worker', (data) => {
  console.log('worker connected', data)
})
socket.on('processed', (data) => {
  console.log('processed', data)
})

const App = () => {
  return (
    <div>
      <Header />
      <div class='columns'>
        <Browser />
        <Tasks />
      </div>
    </div>
  )
}

export default App
