fix role=button on all cards and add correct release_time flag to livestreamLink
This commit is contained in:
parent
7a19764e29
commit
778250aa0e
2 changed files with 3 additions and 2 deletions
|
@ -47,7 +47,7 @@ export default function Card(props: Props) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section
|
<section
|
||||||
role="button"
|
role={onClick ? 'button' : undefined}
|
||||||
className={classnames(className, 'card')}
|
className={classnames(className, 'card')}
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
if (onClick) {
|
if (onClick) {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
// @flow
|
// @flow
|
||||||
import { BITWAVE_LIVE_API } from 'constants/livestream';
|
import { BITWAVE_LIVE_API } from 'constants/livestream';
|
||||||
|
import * as CS from 'constants/claim_search';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Card from 'component/common/card';
|
import Card from 'component/common/card';
|
||||||
import ClaimPreview from 'component/claimPreview';
|
import ClaimPreview from 'component/claimPreview';
|
||||||
|
@ -24,6 +25,7 @@ export default function LivestreamLink(props: Props) {
|
||||||
channel_ids: [livestreamChannelId],
|
channel_ids: [livestreamChannelId],
|
||||||
has_no_source: true,
|
has_no_source: true,
|
||||||
claim_type: ['stream'],
|
claim_type: ['stream'],
|
||||||
|
order_by: CS.ORDER_BY_NEW_VALUE,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res && res.items && res.items.length > 0) {
|
if (res && res.items && res.items.length > 0) {
|
||||||
|
@ -70,7 +72,6 @@ export default function LivestreamLink(props: Props) {
|
||||||
// gonna pass the wrapper in so I don't have to rewrite the dmca/blocking logic in claimPreview.
|
// gonna pass the wrapper in so I don't have to rewrite the dmca/blocking logic in claimPreview.
|
||||||
const element = (props: { children: any }) => (
|
const element = (props: { children: any }) => (
|
||||||
<Card
|
<Card
|
||||||
role="button"
|
|
||||||
className="livestream__channel-link"
|
className="livestream__channel-link"
|
||||||
title={__('Live stream in progress')}
|
title={__('Live stream in progress')}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
Loading…
Add table
Reference in a new issue