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:
infinite-persistence 2022-06-16 12:04:52 +08:00
parent 5c939d0e32
commit 3e5a9ba193
No known key found for this signature in database
GPG key ID: B9C3252EDC3D0AA0
3 changed files with 5 additions and 5 deletions

View file

@ -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) {

View file

@ -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(() => {

View file

@ -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) {