Fixed: React error displaying a search result for an existing movie

Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
pull/2/head
Qstick 5 years ago
parent 1b7f52e013
commit 151bf5b49f

@ -1,10 +1,15 @@
.searchResult { .searchResult {
display: flex; position: relative;
margin: 20px 0; margin: 20px 0;
padding: 20px; padding: 20px;
width: 100%; width: 100%;
background-color: $white;
color: inherit; color: inherit;
}
.underlay {
@add-mixin cover;
background-color: $white;
transition: background 500ms; transition: background 500ms;
&:hover { &:hover {
@ -14,6 +19,13 @@
} }
} }
.overlay {
@add-mixin linkOverlay;
position: relative;
display: flex;
}
.poster { .poster {
flex: 0 0 170px; flex: 0 0 170px;
margin-right: 20px; margin-right: 20px;

@ -70,11 +70,13 @@ class AddNewMovieSearchResult extends Component {
const linkProps = isExistingMovie ? { to: `/movie/${titleSlug}` } : { onPress: this.onPress }; const linkProps = isExistingMovie ? { to: `/movie/${titleSlug}` } : { onPress: this.onPress };
return ( return (
<div> <div className={styles.searchResult}>
<Link <Link
className={styles.searchResult} className={styles.underlay}
{...linkProps} {...linkProps}
> />
<div className={styles.overlay}>
{ {
isSmallScreen ? isSmallScreen ?
null : null :
@ -158,7 +160,7 @@ class AddNewMovieSearchResult extends Component {
{overview} {overview}
</div> </div>
</div> </div>
</Link> </div>
<AddNewMovieModal <AddNewMovieModal
isOpen={isNewAddMovieModalOpen && !isExistingMovie} isOpen={isNewAddMovieModalOpen && !isExistingMovie}

Loading…
Cancel
Save