Skip to content

Commit f3dd616

Browse files
author
Greg Trihus
committed
fix chapter card to have on play button
1 parent e227435 commit f3dd616

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

src/renderer/src/components/Sheet/PassageCard.tsx

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,16 @@ export function PassageCard(props: IProps) {
116116
</>
117117
) : null}
118118
</Typography>
119-
<PlayButton
120-
mediaId={cardInfo.mediaId?.id}
121-
isPlaying={isPlaying && psgType !== PassageTypeEnum.CHAPTERNUMBER}
122-
onPlayStatus={onPlayStatus}
123-
onPlayEnd={handlePlayEnd}
124-
/>
119+
{psgType !== PassageTypeEnum.CHAPTERNUMBER ? (
120+
<PlayButton
121+
mediaId={cardInfo.mediaId?.id}
122+
isPlaying={isPlaying}
123+
onPlayStatus={onPlayStatus}
124+
onPlayEnd={handlePlayEnd}
125+
/>
126+
) : (
127+
<></>
128+
)}
125129
</Box>
126130
{psgType !== PassageTypeEnum.CHAPTERNUMBER ? (
127131
<>
@@ -178,6 +182,7 @@ export function PassageCard(props: IProps) {
178182
sx={{
179183
display: 'flex',
180184
justifyContent: 'space-around',
185+
mt: 2,
181186
}}
182187
>
183188
<PlayButton

0 commit comments

Comments
 (0)