summaryrefslogtreecommitdiff
path: root/apps/web/src/stores/project-store.ts
diff options
context:
space:
mode:
authorMaze <167211895+mazeincoding@users.noreply.github.com>2025-07-12 15:27:00 +0200
committerGitHub <noreply@github.com>2025-07-12 15:27:00 +0200
commit800e720e6ead630a0bf2dc6ca67936dab132f2aa (patch)
treeffb2b78def328ddcce61385ee4dd03d3a976832b /apps/web/src/stores/project-store.ts
parent457d828c45c9294d2161bd6f04ffed7f6137dd1b (diff)
parent799fd2981abe010a5e4362b5c64951be5d0902c0 (diff)
downloadopencut-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.ts5
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(),