From e00cceb643e093d1f252e89507f0e4f1e4fdecb5 Mon Sep 17 00:00:00 2001 From: Tomasz Date: Tue, 4 Jan 2022 11:16:26 +0100 Subject: [PATCH] #166 Fix Settings Button --- src/app/view/view.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/app/view/view.js b/src/app/view/view.js index a99b69c9..96069d6d 100644 --- a/src/app/view/view.js +++ b/src/app/view/view.js @@ -56,6 +56,9 @@ class View { doBtnHallOfFame(`Hall of fame`), buttonPlay('Play the game'), ); + const settingsButton = displayButtonSettings('settings'); + settingsButton.addEventListener('click', this.toggleSettingsView); + this.render('.game-image__btns', settingsButton); }; showRulesButtons() { @@ -74,10 +77,6 @@ class View { ...doHallOfFameContent(gameMode, difficultyLevel), ); this.showRulesButtons(); - - const settingsButton = displayButtonSettings('settings'); - settingsButton.addEventListener('click', this.toggleSettingsView); - this.render('.game-image__btns', settingsButton); }; showSettings() {