diff options
| author | MohamedBassem <me@mbassem.com> | 2024-03-22 15:31:55 +0000 |
|---|---|---|
| committer | MohamedBassem <me@mbassem.com> | 2024-03-22 15:31:55 +0000 |
| commit | 95fc3a0825795b15a387707ac8cb2cb0df3f4c27 (patch) | |
| tree | 71cc8a672b55f9b7903bb8025561ee3b98513034 /apps/web/components | |
| parent | 2cd2f92e9e0c82eaa5f21fe0c30e20ebea7aba24 (diff) | |
| download | karakeep-95fc3a0825795b15a387707ac8cb2cb0df3f4c27.tar.zst | |
feature: Add an option to disable new signups
Diffstat (limited to 'apps/web/components')
| -rw-r--r-- | apps/web/components/signin/CredentialsForm.tsx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/web/components/signin/CredentialsForm.tsx b/apps/web/components/signin/CredentialsForm.tsx index 8e1423eb..5e3b4de9 100644 --- a/apps/web/components/signin/CredentialsForm.tsx +++ b/apps/web/components/signin/CredentialsForm.tsx @@ -13,6 +13,7 @@ import { } from "@/components/ui/form"; import { Input } from "@/components/ui/input"; import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; +import { useClientConfig } from "@/lib/clientConfig"; import { api } from "@/lib/trpc"; import { zodResolver } from "@hookform/resolvers/zod"; import { TRPCClientError } from "@trpc/client"; @@ -100,6 +101,7 @@ function SignIn() { } function SignUp() { + const clientConfig = useClientConfig(); const form = useForm<z.infer<typeof zSignUpSchema>>({ resolver: zodResolver(zSignUpSchema), }); @@ -201,7 +203,11 @@ function SignUp() { ); }} /> - <ActionButton type="submit" loading={form.formState.isSubmitting}> + <ActionButton + type="submit" + loading={form.formState.isSubmitting} + disabled={clientConfig.auth.disableSignups} + > Sign Up </ActionButton> </div> |
