Skip to content

Commit

Permalink
Show vod links with reaction history if available
Browse files Browse the repository at this point in the history
Resolves #76
  • Loading branch information
romanzipp committed May 6, 2024
1 parent a03e20d commit af8036b
Showing 1 changed file with 23 additions and 8 deletions.
31 changes: 23 additions & 8 deletions src/entries/contentScript/components/ReactionsHistoryNotice.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,29 @@ function ReactionPreview({ reaction }) {
{' '}

{reaction.from_stream && (
<a
href={buildReactionFromUrl(reaction)}
target="_blank"
rel="noreferrer"
className="font-bold text-primary-gradient-from"
>
{t('reactionHistory.inAStream', { service: reaction.from_stream?.account?.service?.title })}
</a>
reaction.from_stream.vods.length > 0 ? (
reaction.from_stream.vods?.map((vod) => (
<Fragment key={vod.id}>
<a
href={vod.video.external_tracking_url_time.replace('{timestamp}', reaction.vod_seconds_from)}
target="_blank"
rel="noreferrer"
className="font-bold text-primary-gradient-from"
>
{t('reactionHistory.inAStream', { service: reaction.from_stream?.account?.service?.title })}
</a>
</Fragment>
))
) : (
<a
href={buildReactionFromUrl(reaction)}
target="_blank"
rel="noreferrer"
className="font-bold text-primary-gradient-from"
>
{t('reactionHistory.inAStream', { service: reaction.from_stream?.account?.service?.title })}
</a>
)
)}

{reaction.from_video && (
Expand Down

0 comments on commit af8036b

Please sign in to comment.