added redirect to project page if users not authorized, to be change by rolegate in the future
This commit is contained in:
parent
6e3a9ec7ec
commit
0988a936ad
|
|
@ -1,7 +1,8 @@
|
|||
"use client";
|
||||
"use client"
|
||||
import { redirect } from "next/navigation";
|
||||
|
||||
import Link from "next/link";
|
||||
import { useState } from "react";
|
||||
import React, { useState } from "react";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Card, CardContent } from "@/components/ui/card";
|
||||
import { Checkbox } from "@/components/ui/checkbox";
|
||||
|
|
@ -28,8 +29,15 @@ 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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue