mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-29 05:00:43 +10:00
Bug fix for modal opening for unauthenticated user
This commit is contained in:
parent
76a5f7af44
commit
0b6f83e6cd
1 changed files with 5 additions and 1 deletions
|
|
@ -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 {
|
|||
<Modal
|
||||
id="ListingPage.enquiry"
|
||||
contentClassName={css.enquiryModalContent}
|
||||
isOpen={this.state.enquiryModalOpen}
|
||||
isOpen={isAuthenticated && this.state.enquiryModalOpen}
|
||||
onClose={() => 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),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue