Merge pull request #208 from Sanjit-K/main

fixed: [BUG] crypto.randomUUID is not a function Runtime Error #205. …
This commit is contained in:
Maze
2025-07-12 15:27:00 +02:00
committed by GitHub
5 changed files with 44 additions and 10 deletions

View File

@ -1,6 +1,7 @@
import { create } from "zustand";
import { storageService } from "@/lib/storage/storage-service";
import { useTimelineStore } from "./timeline-store";
import { generateUUID } from "@/lib/utils";
export type MediaType = "image" | "video" | "audio";
@ -162,7 +163,7 @@ export const useMediaStore = create<MediaStore>((set, get) => ({
addMediaItem: async (projectId, item) => {
const newItem: MediaItem = {
...item,
id: crypto.randomUUID(),
id: generateUUID(),
};
// Add to local state immediately for UI responsiveness