summaryrefslogtreecommitdiff
path: root/app/client/modules/biggan/index.js
blob: 6c94008fa4c7bf8a1147e90550d977146f16f34c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import { h, Component } from 'preact'
import { Route, Link } from 'react-router-dom'

import actions from '../../actions'

import util from '../../util'

import BigGANLive from './views/biggan.live'

class router {
  componentWillMount(){
    actions.system.changeTool('biggan')
    document.body.style.backgroundImage = 'linear-gradient(' + (util.randint(40)+40) + 'deg, #dfe, #def)'
  }
  componentWillReceiveProps(){
    actions.system.changeTool('biggan')
    document.body.style.backgroundImage = 'linear-gradient(' + (util.randint(40)+40) + 'deg, #dfe, #def)'
  }
  render(){
    return (
      <section>
        <Route exact path='/biggan/live/' component={BigGANLive} />
      </section>
    )
  }
}

function links(){
  return [
    { url: '/biggan/live/', name: 'live' },
  ]
}

export default {
  name: 'biggan',
  router, links,
}