diff --git a/frontend/src/HomePage/BlankPage.jsx b/frontend/src/HomePage/BlankPage.jsx index 4a0539aee3..ee68b8b67c 100644 --- a/frontend/src/HomePage/BlankPage.jsx +++ b/frontend/src/HomePage/BlankPage.jsx @@ -1,4 +1,5 @@ import React from 'react'; +import TemplateLibraryModal from './TemplateLibraryModal/'; export const BlankPage = function BlankPage({ createApp, @@ -7,6 +8,9 @@ export const BlankPage = function BlankPage({ handleImportApp, isImportingApp, fileInput, + showTemplateLibraryModal, + hideTemplateLibraryModal, + viewTemplateLibraryModal, }) { return (
@@ -41,11 +45,20 @@ export const BlankPage = function BlankPage({ + + Choose from template +
+ ); }; diff --git a/frontend/src/HomePage/HomePage.jsx b/frontend/src/HomePage/HomePage.jsx index 69c87b4da7..375ad97bdc 100644 --- a/frontend/src/HomePage/HomePage.jsx +++ b/frontend/src/HomePage/HomePage.jsx @@ -424,7 +424,12 @@ class HomePage extends React.Component { }); }; - showTemplateLibraryModal = () => this.setState({ showTemplateLibraryModal: true }); + showTemplateLibraryModal = () => { + this.setState({ showTemplateLibraryModal: true }); + }; + hideTemplateLibraryModal = () => { + this.setState({ showTemplateLibraryModal: false }); + }; render() { const { @@ -541,6 +546,9 @@ class HomePage extends React.Component { handleImportApp={this.handleImportApp} creatingApp={creatingApp} darkMode={this.props.darkMode} + showTemplateLibraryModal={this.state.showTemplateLibraryModal} + viewTemplateLibraryModal={this.showTemplateLibraryModal} + hideTemplateLibraryModal={this.hideTemplateLibraryModal} /> )}