Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
SuveenE committed Nov 7, 2024
1 parent 18b5971 commit 2b50318
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/components/imageUpload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ export default function ImageUpload({ images, setImages }: ImageUploadProps) {
});

useEffect(() => {
imageUrls.forEach(url => URL.revokeObjectURL(url));
const urls = images.map(file => URL.createObjectURL(file));
imageUrls.forEach((url) => URL.revokeObjectURL(url));

const urls = images.map((file) => URL.createObjectURL(file));
setImageUrls(urls);
return () => urls.forEach(url => URL.revokeObjectURL(url));
return () => urls.forEach((url) => URL.revokeObjectURL(url));
}, [images]);

const removeImage = (index: number) => {
Expand All @@ -62,7 +62,7 @@ export default function ImageUpload({ images, setImages }: ImageUploadProps) {
{images.map((file, index) => (
<div key={index} className="relative">
<Image
src={imageUrls[index] || ''}
src={imageUrls[index] || ""}
alt={`Upload ${index + 1}`}
className="w-full h-24 object-cover rounded"
width={100}
Expand Down
2 changes: 1 addition & 1 deletion src/components/videoGenerator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default function VideoGenerator({
.map((_, i) => `file 'image${i}.jpg'\nduration 1`)
.join("\n");
await ffmpeg.writeFile("concat.txt", concat);
setProgress(45);
setProgress(45);

const audioResponse = await fetch(audioTrack);
const audioData = await audioResponse.arrayBuffer();
Expand Down

0 comments on commit 2b50318

Please sign in to comment.