From fed8c6b0ea1f6e15c3c748828c15d9758846340b Mon Sep 17 00:00:00 2001 From: Lukas Martinelli Date: Thu, 22 Dec 2016 14:21:53 +0100 Subject: [PATCH] Delay modal rendering until open --- src/components/Toolbar.jsx | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/src/components/Toolbar.jsx b/src/components/Toolbar.jsx index 1c63828..462328d 100644 --- a/src/components/Toolbar.jsx +++ b/src/components/Toolbar.jsx @@ -121,22 +121,25 @@ export default class Toolbar extends React.Component { top: 0, backgroundColor: colors.black }}> - this.toggleSettings.bind(this)} - /> - this.toggleOpen.bind(this)} - /> - this.toggleSources.bind(this)} - /> + {this.state.openSettingsModal && this.toggleSettings.bind(this)} + /> + } + {this.state.openOpenModal && this.toggleOpen.bind(this)} + /> + } + {this.state.openSourcesModal && this.toggleSources.bind(this)} + /> + }