Rename: use-thumbnail --> use-get-poster
This disambiguates the other effect file called `use-get-thumbnail`, and is also clearer.
This commit is contained in:
parent
5c939d0e32
commit
3e5a9ba193
3 changed files with 5 additions and 5 deletions
|
@ -15,7 +15,7 @@ import { LivestreamContext } from 'page/livestream/view';
|
|||
import { formatLbryUrlForWeb } from 'util/url';
|
||||
import FileViewerEmbeddedTitle from 'component/fileViewerEmbeddedTitle';
|
||||
import useFetchLiveStatus from 'effects/use-fetch-live';
|
||||
import useThumbnail from 'effects/use-thumbnail';
|
||||
import useGetPoster from 'effects/use-get-poster';
|
||||
|
||||
type Props = {
|
||||
channelClaimId: ?string,
|
||||
|
@ -108,7 +108,7 @@ export default function FileRenderInitiator(props: Props) {
|
|||
// in case of a livestream outside of the livestream page component, like embed
|
||||
useFetchLiveStatus(isLivestreamClaim && !livestreamPage ? channelClaimId : undefined, doFetchChannelLiveStatus);
|
||||
|
||||
const thumbnail = useThumbnail(claimThumbnail, containerRef);
|
||||
const thumbnail = useGetPoster(claimThumbnail, containerRef);
|
||||
|
||||
function handleClick() {
|
||||
if (embedded && !isPlayable) {
|
||||
|
|
|
@ -4,7 +4,7 @@ import React from 'react';
|
|||
// $FlowFixMe cannot resolve ...
|
||||
import FileRenderPlaceholder from 'static/img/fileRenderPlaceholder.png';
|
||||
|
||||
export default function useThumbnail(claimThumbnail: ?string, containerRef: any) {
|
||||
export default function useGetPoster(claimThumbnail: ?string, containerRef: any) {
|
||||
const [thumbnail, setThumbnail] = React.useState(FileRenderPlaceholder);
|
||||
|
||||
React.useEffect(() => {
|
|
@ -13,7 +13,7 @@ import { useHistory } from 'react-router';
|
|||
import Yrbl from 'component/yrbl';
|
||||
// $FlowFixMe cannot resolve ...
|
||||
import useFetchLiveStatus from 'effects/use-fetch-live';
|
||||
import useThumbnail from 'effects/use-thumbnail';
|
||||
import useGetPoster from 'effects/use-get-poster';
|
||||
|
||||
type Props = {
|
||||
uri: string,
|
||||
|
@ -119,7 +119,7 @@ export default function EmbedWrapperPage(props: Props) {
|
|||
(outpoint.txid === txid && outpoint.nout === nout)
|
||||
);
|
||||
|
||||
const thumbnail = useThumbnail(claimThumbnail, containerRef);
|
||||
const thumbnail = useGetPoster(claimThumbnail, containerRef);
|
||||
|
||||
React.useEffect(() => {
|
||||
if (!latestClaimUrl && liveContentPath && claimId) {
|
||||
|
|
Loading…
Reference in a new issue