diff options
Diffstat (limited to 'client/components/Modal.jsx')
| -rw-r--r-- | client/components/Modal.jsx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/client/components/Modal.jsx b/client/components/Modal.jsx index fded5e2..2d7cc13 100644 --- a/client/components/Modal.jsx +++ b/client/components/Modal.jsx @@ -1,5 +1,6 @@ import { h, Component } from 'preact' import { Link } from 'react-router-dom' +import { randrange } from '../util' export default class Modal extends Component { render() { @@ -14,7 +15,7 @@ export default class Modal extends Component { ? 'modal visible' : 'modal' - const style = 'background-color:hsl(' + randint(360) + ',20%,95%)' + const style = 'background-color:hsl(' + randrange(0,140) + ',100%,98%)' return ( <div class={className} style={style}> @@ -25,6 +26,3 @@ export default class Modal extends Component { ) } } - -function randint(n){ return (Math.random()*n)|0 } -function randrange(n){ return (Math.random()*n)|0 }
\ No newline at end of file |
