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 (
) } } function links(){ return [ { url: '/morph/app/', name: 'morph' }, ] } export default { name: 'morph', router, links, }