Fixed: React error when displaying a search result for an existing item

Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
pull/6/head
Qstick 5 years ago
parent 3cfdb2ccfd
commit 1a0d276c72

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

@ -94,11 +94,13 @@ class AddNewAlbumSearchResult extends Component {
const height = calculateHeight(230, isSmallScreen); const height = calculateHeight(230, isSmallScreen);
return ( return (
<div> <div className={styles.searchResult}>
<Link <Link
className={styles.searchResult} className={styles.underlay}
{...linkProps} {...linkProps}
> />
<div className={styles.overlay}>
{ {
!isSmallScreen && !isSmallScreen &&
<AlbumCover <AlbumCover
@ -212,7 +214,7 @@ class AddNewAlbumSearchResult extends Component {
/> />
</div> </div>
</div> </div>
</Link> </div>
<AddNewAlbumModal <AddNewAlbumModal
isOpen={isNewAddAlbumModalOpen && !isExistingAlbum} isOpen={isNewAddAlbumModalOpen && !isExistingAlbum}

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

@ -92,11 +92,13 @@ class AddNewArtistSearchResult extends Component {
const height = calculateHeight(230, isSmallScreen); const height = calculateHeight(230, isSmallScreen);
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 :
@ -190,7 +192,7 @@ class AddNewArtistSearchResult extends Component {
/> />
</div> </div>
</div> </div>
</Link> </div>
<AddNewArtistModal <AddNewArtistModal
isOpen={isNewAddArtistModalOpen && !isExistingArtist} isOpen={isNewAddArtistModalOpen && !isExistingArtist}

Loading…
Cancel
Save