New: Ability to navigate to author from book detail view

Fix link to be inline rather than separate const
pull/3356/head
plmcgrn 3 months ago
parent d0df761422
commit 07707b1278

@ -6,6 +6,7 @@ import BookCover from 'Book/BookCover';
import HeartRating from 'Components/HeartRating'; import HeartRating from 'Components/HeartRating';
import Icon from 'Components/Icon'; import Icon from 'Components/Icon';
import Label from 'Components/Label'; import Label from 'Components/Label';
import Link from 'Components/Link/Link';
import Marquee from 'Components/Marquee'; import Marquee from 'Components/Marquee';
import Measure from 'Components/Measure'; import Measure from 'Components/Measure';
import MonitorToggleButton from 'Components/MonitorToggleButton'; import MonitorToggleButton from 'Components/MonitorToggleButton';
@ -113,7 +114,7 @@ class BookDetailsHeader extends Component {
className={styles.monitorToggleButton} className={styles.monitorToggleButton}
monitored={monitored} monitored={monitored}
isSaving={isSaving} isSaving={isSaving}
size={isSmallScreen ? 30: 40} size={isSmallScreen ? 30 : 40}
onPress={onMonitorTogglePress} onPress={onMonitorTogglePress}
/> />
</div> </div>
@ -131,12 +132,13 @@ class BookDetailsHeader extends Component {
</div> </div>
<div> <div>
{author.authorName} <Link to={`/author/${author.titleSlug}`}>
{ {author.authorName}
!!pageCount && </Link>
<span className={styles.duration}> {!!pageCount &&
{`${pageCount} pages`} <span className={styles.duration}>
</span> {`${pageCount} pages`}
</span>
} }
<HeartRating <HeartRating
@ -147,23 +149,22 @@ class BookDetailsHeader extends Component {
</div> </div>
<div className={styles.detailsLabels}> <div className={styles.detailsLabels}>
{ {releaseDate &&
releaseDate && <Label
<Label className={styles.detailsLabel}
className={styles.detailsLabel} size={sizes.LARGE}
size={sizes.LARGE} >
> <Icon
<Icon name={icons.CALENDAR}
name={icons.CALENDAR} size={17}
size={17} />
/>
<span className={styles.sizeOnDisk}> <span className={styles.sizeOnDisk}>
{ {
moment(releaseDate).format(shortDateFormat) moment(releaseDate).format(shortDateFormat)
} }
</span> </span>
</Label> </Label>
} }
<Label <Label

Loading…
Cancel
Save