lbry-desktop/ui/component/livestreamDateTime/index.js
infinite-persistence 88907901a1 Fix livestream date incorrect if short url is used
## Issue
- "https://odysee.com/LIVE:6dd" yields "Live 3 months ago" (incorrect)
- "https://odysee.com/@RekietaLaw:a/LIVE:6dd" yields "Live 30 minutes ago" (correct)

## Approach
Use claim ID instead of uri when searching `activeLivestreams`
2022-02-15 22:16:46 -08:00

14 lines
492 B
JavaScript

import { connect } from 'react-redux';
import { makeSelectClaimForUri } from 'redux/selectors/claims';
import { selectActiveLivestreamForClaimId } from 'redux/selectors/livestream';
import LivestreamDateTime from './view';
const select = (state, props) => {
const claim = props.uri && makeSelectClaimForUri(props.uri)(state);
return {
claim,
activeLivestream: selectActiveLivestreamForClaimId(state, claim?.claim_id),
};
};
export default connect(select)(LivestreamDateTime);