summaryrefslogtreecommitdiff
path: root/apps/web/src/stores/timeline-store.ts
diff options
context:
space:
mode:
authorMaze Winther <mazewinther@gmail.com>2025-07-25 15:34:53 +0200
committerMaze Winther <mazewinther@gmail.com>2025-07-25 15:34:53 +0200
commitd667c1095c58490bfdabbf50e044384e7fee943d (patch)
treed1ee64ed535843a83ff14211a92708dcbadf765e /apps/web/src/stores/timeline-store.ts
parent9a18a7a4e961375f80417d50a3c326c63e74dfe8 (diff)
parent65c3f9f7f78f787262a88c75b96a118ca5bee15c (diff)
downloadopencut-d667c1095c58490bfdabbf50e044384e7fee943d.tar.gz
Merge branch 'staging' of https://github.com/mazeincoding/AppCut into staging
Diffstat (limited to 'apps/web/src/stores/timeline-store.ts')
-rw-r--r--apps/web/src/stores/timeline-store.ts11
1 files changed, 6 insertions, 5 deletions
diff --git a/apps/web/src/stores/timeline-store.ts b/apps/web/src/stores/timeline-store.ts
index 8a4abc6a..820025cc 100644
--- a/apps/web/src/stores/timeline-store.ts
+++ b/apps/web/src/stores/timeline-store.ts
@@ -295,9 +295,8 @@ export const useTimelineStore = create<TimelineStore>((set, get) => {
{ trackId, elementId },
],
};
- } else {
- return { selectedElements: [{ trackId, elementId }] };
}
+ return { selectedElements: [{ trackId, elementId }] };
});
},
@@ -680,7 +679,8 @@ export const useTimelineStore = create<TimelineStore>((set, get) => {
(element) => element.id !== elementId
),
};
- } else if (track.id === toTrackId) {
+ }
+ if (track.id === toTrackId) {
return {
...track,
elements: [...track.elements, elementToMove],
@@ -1091,7 +1091,7 @@ export const useTimelineStore = create<TimelineStore>((set, get) => {
if (!fileType) return false;
// Process the new media file
- let mediaData: any = {
+ const mediaData: any = {
name: newFile.name,
type: fileType,
file: newFile,
@@ -1204,7 +1204,8 @@ export const useTimelineStore = create<TimelineStore>((set, get) => {
);
const { thumbnailUrl } = await generateVideoThumbnail(mediaItem.file);
return thumbnailUrl;
- } else if (mediaItem.type === "image" && mediaItem.url) {
+ }
+ if (mediaItem.type === "image" && mediaItem.url) {
return mediaItem.url;
}