File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed
apps/web/app/(org)/dashboard/caps Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ export type UploadState =
3333 status : "uploadingVideo" ;
3434 capId : string ;
3535 progress : number ;
36+ thumbnailUrl : string | undefined ;
3637 } ;
3738
3839const UploadingContext = createContext < UploadingContextType | undefined > (
Original file line number Diff line number Diff line change @@ -310,9 +310,10 @@ export const UploadCapButton = ({
310310 if ( event . lengthComputable ) {
311311 const percent = ( event . loaded / event . total ) * 100 ;
312312 setState ( {
313- status : "uploadingThumbnail " ,
313+ status : "uploadingVideo " ,
314314 capId : uploadId ,
315315 progress : percent ,
316+ thumbnailUrl : thumbnailUrl ,
316317 } ) ;
317318
318319 setUploadState ( {
Original file line number Diff line number Diff line change @@ -22,17 +22,17 @@ export const UploadPlaceholderCard = () => {
2222 return (
2323 < div className = "flex flex-col gap-4 w-full h-full rounded-xl bg-gray-1 border-gray-3 border-[1px]" >
2424 < div className = "overflow-hidden relative w-full bg-black rounded-t-xl border-b border-gray-3 aspect-video group" >
25- { /*{uploadingThumbnailUrl ? (
25+ { state . status === "uploading" ? (
2626 < img
27- src={uploadingThumbnailUrl }
27+ src = { state . thumbnailUrl }
2828 alt = "Uploading thumbnail"
2929 className = "object-cover w-full h-full"
3030 />
3131 ) : (
3232 < div className = "flex justify-center items-center w-full h-full" >
3333 < LogoSpinner className = "w-8 h-8 animate-spin" />
3434 </ div >
35- )}*/ }
35+ ) }
3636
3737 < div className = "absolute inset-0 transition-all duration-300 bg-black/60" > </ div >
3838
You can’t perform that action at this time.
0 commit comments