From 0b6f83e6cd58305edb6b90e5377154ccf6d7692f Mon Sep 17 00:00:00 2001 From: Vesa Luusua Date: Fri, 19 Jan 2018 16:02:44 +0200 Subject: [PATCH] Bug fix for modal opening for unauthenticated user --- src/containers/ListingPage/ListingPage.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/containers/ListingPage/ListingPage.js b/src/containers/ListingPage/ListingPage.js index 4e110bf3..e76fb1ff 100644 --- a/src/containers/ListingPage/ListingPage.js +++ b/src/containers/ListingPage/ListingPage.js @@ -222,6 +222,7 @@ export class ListingPageComponent extends Component { const { unitType, tab, + isAuthenticated, currentUser, getListing, intl, @@ -583,7 +584,7 @@ export class ListingPageComponent extends Component { this.setState({ enquiryModalOpen: false })} onManageDisableScrolling={onManageDisableScrolling} > @@ -690,6 +691,7 @@ ListingPageComponent.propTypes = { id: string.isRequired, slug: string, }).isRequired, + isAuthenticated: bool.isRequired, currentUser: propTypes.currentUser, getListing: func.isRequired, onManageDisableScrolling: func.isRequired, @@ -706,6 +708,7 @@ ListingPageComponent.propTypes = { }; const mapStateToProps = state => { + const { isAuthenticated } = state.Auth; const { showListingError, reviews, @@ -722,6 +725,7 @@ const mapStateToProps = state => { }; return { + isAuthenticated, currentUser, getListing, scrollingDisabled: isScrollingDisabled(state),