diff --git a/src/components/App/App.jsx b/src/components/App/App.jsx index 46c5601..b86c168 100644 --- a/src/components/App/App.jsx +++ b/src/components/App/App.jsx @@ -2,7 +2,6 @@ import React, { Component } from 'react'; import './App.scss'; import Navbar from '../Navbar/Navbar'; import GameContainer from '../GameContainer/GameContainer'; -import Footer from '../Footer/Footer'; import { removeHash } from '../../data/helperFuncs'; const options = {}; @@ -25,6 +24,16 @@ class App extends Component { this.setState({gameState: 'chooseCharacters'}); } + componentWillUpdate(nextProps, nextState) { + // This is primarily for demo site purposes. Hides footer when game is on. + if(document.getElementById('footer')) { + if(nextState.gameState=='chooseCharacters') + document.getElementById('footer').style.visibility = "visible"; + else + document.getElementById('footer').style.visibility = "hidden"; + } + } + render() { return (
@@ -41,7 +50,6 @@ class App extends Component { />
- {this.state.gameState=='chooseCharacters'?