diff --git a/projects/packages/videopress/changelog/fix-videopress-local-video-listed b/projects/packages/videopress/changelog/fix-videopress-local-video-listed new file mode 100644 index 000000000000..7b561f2d36e8 --- /dev/null +++ b/projects/packages/videopress/changelog/fix-videopress-local-video-listed @@ -0,0 +1,4 @@ +Significance: patch +Type: fixed + +VideoPress: Fix local video listed as VideoPress video diff --git a/projects/packages/videopress/src/client/admin/components/video-list/index.tsx b/projects/packages/videopress/src/client/admin/components/video-list/index.tsx index 92b6ff12b25c..c6a9ca6f3475 100644 --- a/projects/packages/videopress/src/client/admin/components/video-list/index.tsx +++ b/projects/packages/videopress/src/client/admin/components/video-list/index.tsx @@ -11,7 +11,7 @@ import { useState } from 'react'; */ import { VIDEO_PRIVACY_LEVELS, VIDEO_PRIVACY_LEVEL_PRIVATE } from '../../../state/constants'; import Checkbox from '../checkbox'; -import ConnectVideoRow, { VideoRow, Stats } from '../video-row'; +import ConnectVideoRow, { LocalVideoRow, Stats } from '../video-row'; import styles from './style.module.scss'; /** * Types @@ -151,7 +151,7 @@ export const LocalVideoList = ( { return null; } return ( - { const textRef = useRef( null ); const checkboxRef = useRef( null ); @@ -320,11 +321,17 @@ export const VideoRow = ( { ) } - + { ! isLocalVideo && ( + + ) } ); }; +export const LocalVideoRow = ( props: VideoRowProps ) => { + return ; +}; + export const ConnectVideoRow = ( { id, ...restProps }: VideoRowProps ) => { const { isDeleting, uploading, processing, isUpdatingPoster, data, uploadProgress } = useVideo( id diff --git a/projects/packages/videopress/src/client/admin/components/video-row/types.ts b/projects/packages/videopress/src/client/admin/components/video-row/types.ts index 2c17ec32da4d..cb8b1e152340 100644 --- a/projects/packages/videopress/src/client/admin/components/video-row/types.ts +++ b/projects/packages/videopress/src/client/admin/components/video-row/types.ts @@ -59,6 +59,10 @@ type VideoRowBaseProps = { * Adornment to be showed after title. */ disableActionButton?: boolean; + /** + * True when row is used to show a local video. + */ + isLocalVideo?: boolean; }; type VideoPressVideoProps = VideoRowBaseProps &