blob: 9c90848836d7f4f95bac7b4af5109644d13a298c (
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 MorphApp from './views/morph.app'
class router {
componentWillMount(){
actions.system.changeTool('morph')
document.body.style.backgroundImage = 'linear-gradient(' + (util.randint(40)+40) + 'deg, #def, #dfe)'
}
componentWillReceiveProps(){
actions.system.changeTool('morph')
document.body.style.backgroundImage = 'linear-gradient(' + (util.randint(40)+40) + 'deg, #def, #dfe)'
}
render(){
return (
<section>
<Route exact path='/morph/app/' component={MorphApp} />
</section>
)
}
}
function links(){
return [
{ url: '/morph/app/', name: 'morph' },
]
}
export default {
name: 'morph',
router, links,
}
|