diff options
Diffstat (limited to 'apps/web')
| -rw-r--r-- | apps/web/src/app/projects/page.tsx | 12 | ||||
| -rw-r--r-- | apps/web/src/stores/project-store.ts | 11 |
2 files changed, 2 insertions, 21 deletions
diff --git a/apps/web/src/app/projects/page.tsx b/apps/web/src/app/projects/page.tsx index 9fcb025b..499b999a 100644 --- a/apps/web/src/app/projects/page.tsx +++ b/apps/web/src/app/projects/page.tsx @@ -1,8 +1,7 @@ -"use client" -import { redirect } from "next/navigation"; +"use client"; import Link from "next/link"; -import React, { useState } from "react"; +import { useState } from "react"; import { Button } from "@/components/ui/button"; import { Card, CardContent } from "@/components/ui/card"; import { Checkbox } from "@/components/ui/checkbox"; @@ -29,15 +28,8 @@ import { useProjectStore } from "@/stores/project-store"; import { useRouter } from "next/navigation"; import { DeleteProjectDialog } from "@/components/delete-project-dialog"; import { RenameProjectDialog } from "@/components/rename-project-dialog"; -import { toast } from "sonner"; export default function ProjectsPage() { - - if (process.env.NODE_ENV !== "development") { - toast.error("You are not allowed to access this page"); - redirect("/"); - } - const { createNewProject, savedProjects, diff --git a/apps/web/src/stores/project-store.ts b/apps/web/src/stores/project-store.ts index 5017be2d..efb9cc71 100644 --- a/apps/web/src/stores/project-store.ts +++ b/apps/web/src/stores/project-store.ts @@ -5,7 +5,6 @@ import { toast } from "sonner"; import { useMediaStore } from "./media-store";
import { useTimelineStore } from "./timeline-store";
import { generateUUID } from "@/lib/utils";
-import { env } from "@/env";
interface ProjectStore {
activeProject: TProject | null;
@@ -37,16 +36,6 @@ export const useProjectStore = create<ProjectStore>((set, get) => ({ isInitialized: false,
createNewProject: async (name: string) => {
- try {
- if (process.env.NODE_ENV !== "development") {
- toast.error("Project creation is disabled outside development environment");
- throw new Error("Not allowed in production");
- }
- } catch (error) {
- toast.error("Failed to create new project");
- throw error;
- }
-
const newProject: TProject = {
id: generateUUID(),
name,
|
