Fixed react error when displaying a series search result for an existing series

This commit is contained in:
Mark McDowall 2019-11-14 08:43:07 -08:00
parent a6d0dddaf7
commit 0d1c2ac40c
2 changed files with 20 additions and 6 deletions

View File

@ -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;

View File

@ -77,11 +77,13 @@ class AddNewSeriesSearchResult extends Component {
} }
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 :
@ -169,7 +171,7 @@ class AddNewSeriesSearchResult extends Component {
{overview} {overview}
</div> </div>
</div> </div>
</Link> </div>
<AddNewSeriesModal <AddNewSeriesModal
isOpen={isNewAddSeriesModalOpen && !isExistingSeries} isOpen={isNewAddSeriesModalOpen && !isExistingSeries}