File tree Expand file tree Collapse file tree
apps/web/app/(org)/dashboard/caps/components/CapCard Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -213,6 +213,8 @@ export const CapCard = ({
213213 cap . id ,
214214 cap . hasActiveUpload || false ,
215215 ) ;
216+ const hasVisibleUploadProgress =
217+ uploadProgress !== null && uploadProgress . status !== "fetching" ;
216218 const [ imageStatus , setImageStatus ] = useState < ImageLoadingStatus > ( "loading" ) ;
217219 const prevUploadProgressRef = useRef ( uploadProgress ) ;
218220
@@ -595,7 +597,7 @@ export const CapCard = ({
595597 < div className = "relative aspect-video w-full" >
596598 < Link
597599 className = { clsx (
598- "relative" ,
600+ "relative block w-full h-full " ,
599601 // "block group",
600602 anyCapSelected && "cursor-pointer pointer-events-none" ,
601603 ) }
@@ -604,7 +606,7 @@ export const CapCard = ({
604606 } }
605607 href = { `/s/${ cap . id } ` }
606608 >
607- { uploadProgress && uploadProgress ?. status !== "fetching" && (
609+ { hasVisibleUploadProgress && (
608610 < >
609611 < div className = "absolute inset-0 z-20 transition-all duration-300 bg-black/60 rounded-t-xl" />
610612 < div className = "flex absolute bottom-3 left-3 gap-2 items-center z-30" >
@@ -697,7 +699,9 @@ export const CapCard = ({
697699 ) }
698700
699701 < VideoThumbnail
700- videoDuration = { cap . duration }
702+ videoDuration = {
703+ hasVisibleUploadProgress ? undefined : cap . duration
704+ }
701705 imageClass = { clsx (
702706 anyCapSelected
703707 ? "opacity-50"
You can’t perform that action at this time.
0 commit comments