diff --git a/src/app/(content)/register/page.tsx b/src/app/(content)/register/page.tsx index ae75248..98dd6b9 100644 --- a/src/app/(content)/register/page.tsx +++ b/src/app/(content)/register/page.tsx @@ -14,6 +14,7 @@ import { categoriesList } from "@/data/categoryList"; import { tiaraFont } from "@/lib/fonts"; import { CheckedItem, Event, Events } from "@/lib/interfaces"; import { cn } from "@/lib/utils"; +import { UserRole } from "@prisma/client"; import { signIn, useSession } from "next-auth/react"; import React, { useEffect, useState } from "react"; @@ -213,6 +214,10 @@ const Register: React.FC = () => { return totalSum; }; + if (session.data?.user.role !== UserRole.ADMIN) { + return