disable multiple team creation for self-hosters
This commit is contained in:
@@ -17,6 +17,7 @@ import { Input } from "@unsend/ui/src/input";
|
||||
import { Spinner } from "@unsend/ui/src/spinner";
|
||||
import { api } from "~/trpc/react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { toast } from "@unsend/ui/src/toaster";
|
||||
|
||||
const FormSchema = z.object({
|
||||
name: z.string().min(2, {
|
||||
@@ -43,6 +44,9 @@ export default function CreateTeam() {
|
||||
utils.team.invalidate();
|
||||
router.replace("/dashboard");
|
||||
},
|
||||
onError: (e) => {
|
||||
toast.error(e.message);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
@@ -1,19 +0,0 @@
|
||||
"use client";
|
||||
|
||||
export default function TeamCreationDisabled() {
|
||||
|
||||
return (
|
||||
<div className="flex items-center justify-center min-h-screen ">
|
||||
<div className=" w-[300px] flex flex-col gap-8">
|
||||
<div>
|
||||
<h1 className="text-2xl font-semibold text-center">Cannot sign up</h1>
|
||||
</div>
|
||||
<div>
|
||||
<p className="text-center">
|
||||
Team creation is disabled. Please contact your administrator.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user