diff options
| author | Maze <167211895+mazeincoding@users.noreply.github.com> | 2025-07-12 15:27:00 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-12 15:27:00 +0200 |
| commit | 800e720e6ead630a0bf2dc6ca67936dab132f2aa (patch) | |
| tree | ffb2b78def328ddcce61385ee4dd03d3a976832b /apps/web/src/stores/project-store.ts | |
| parent | 457d828c45c9294d2161bd6f04ffed7f6137dd1b (diff) | |
| parent | 799fd2981abe010a5e4362b5c64951be5d0902c0 (diff) | |
| download | opencut-800e720e6ead630a0bf2dc6ca67936dab132f2aa.tar.gz | |
Merge pull request #208 from Sanjit-K/main
fixed: [BUG] crypto.randomUUID is not a function Runtime Error #205. …
Diffstat (limited to 'apps/web/src/stores/project-store.ts')
| -rw-r--r-- | apps/web/src/stores/project-store.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/web/src/stores/project-store.ts b/apps/web/src/stores/project-store.ts index 3cc2a1dc..efb9cc71 100644 --- a/apps/web/src/stores/project-store.ts +++ b/apps/web/src/stores/project-store.ts @@ -4,6 +4,7 @@ import { storageService } from "@/lib/storage/storage-service"; import { toast } from "sonner";
import { useMediaStore } from "./media-store";
import { useTimelineStore } from "./timeline-store";
+import { generateUUID } from "@/lib/utils";
interface ProjectStore {
activeProject: TProject | null;
@@ -36,7 +37,7 @@ export const useProjectStore = create<ProjectStore>((set, get) => ({ createNewProject: async (name: string) => {
const newProject: TProject = {
- id: crypto.randomUUID(),
+ id: generateUUID(),
name,
thumbnail: "",
createdAt: new Date(),
@@ -224,7 +225,7 @@ export const useProjectStore = create<ProjectStore>((set, get) => ({ existingNumbers.length > 0 ? Math.max(...existingNumbers) + 1 : 1;
const newProject: TProject = {
- id: crypto.randomUUID(),
+ id: generateUUID(),
name: `(${nextNumber}) ${baseName}`,
thumbnail: project.thumbnail,
createdAt: new Date(),
|
