update demo specific code

This commit is contained in:
Antti Pilto 2017-04-29 21:57:43 +03:00
parent b4663088d7
commit 6cbe26f917
2 changed files with 5 additions and 5 deletions

View file

@ -1,7 +1,7 @@
# Kana Quiz 2 # Kana Quiz 2
Kana Quiz made with React.js. Kana Quiz made with React.js.
See live at http://simplemedia.org/kana/ See live at https://kana.pro/
Install deps: `npm install` Install deps: `npm install`

View file

@ -25,18 +25,18 @@ class App extends Component {
} }
componentWillUpdate(nextProps, nextState) { componentWillUpdate(nextProps, nextState) {
// This is primarily for demo site purposes. Hides footer when game is on. // This is primarily for demo site purposes. Hides #footer when game is on.
if(document.getElementById('footer')) { if(document.getElementById('footer')) {
if(nextState.gameState=='chooseCharacters') if(nextState.gameState=='chooseCharacters')
document.getElementById('footer').style.visibility = "visible"; document.getElementById('footer').style.display = "block";
else else
document.getElementById('footer').style.visibility = "hidden"; document.getElementById('footer').style.display = "none";
} }
} }
componentWillMount() { componentWillMount() {
if(document.getElementById('footer')) if(document.getElementById('footer'))
document.getElementById('footer').style.visibility = "visible"; document.getElementById('footer').style.display = "block";
} }
render() { render() {