From 7447b5acff3c8397d9468cca6f68c0f9c85789ac Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Thu, 14 Mar 2024 05:28:43 +0000 Subject: [PATCH] [autofix.ci] apply automated fixes --- .../auth/signup/components/admin-register.tsx | 65 ++++++++++++------- .../app/auth/signup/components/signup.tsx | 4 +- .../signup/components/user-register-form.tsx | 11 ++-- 3 files changed, 48 insertions(+), 32 deletions(-) diff --git a/ee/tabby-ui/app/auth/signup/components/admin-register.tsx b/ee/tabby-ui/app/auth/signup/components/admin-register.tsx index 35cf0b0dda60..0e4bf0aa3f62 100644 --- a/ee/tabby-ui/app/auth/signup/components/admin-register.tsx +++ b/ee/tabby-ui/app/auth/signup/components/admin-register.tsx @@ -1,27 +1,33 @@ -"use client"; +'use client' -import { useState } from "react"; +import { useState } from 'react' import { useRouter } from 'next/navigation' -import { cn } from "@/lib/utils"; +import { cn } from '@/lib/utils' +import { Button } from '@/components/ui/button' -import { Button } from "@/components/ui/button" import { UserAuthForm } from './user-register-form' import './admin-register.css' -export default function AdminRegister () { +export default function AdminRegister() { const router = useRouter() const [step, setStep] = useState(1) return ( -
- -
2 })}> +
+
2 + })} + >

Welcome To Tabby Enterprise

@@ -31,24 +37,34 @@ export default function AdminRegister () {

This will allow you to invite team members and manage your instance.

-
-
+

Create Admin Account

Your instance will be secured, only registered users can access it.

- setStep(3)} buttonClass="self-start w-48" /> + setStep(3)} + buttonClass="self-start w-48" + />
-
+

Enter The Instance

@@ -56,14 +72,13 @@ export default function AdminRegister () { Congratulations! You have successfully created an admin account.

- To begin collaborating with your team, please open the dashboard and invite members to join your instance. + To begin collaborating with your team, please open the dashboard and + invite members to join your instance.

-
) -} \ No newline at end of file +} diff --git a/ee/tabby-ui/app/auth/signup/components/signup.tsx b/ee/tabby-ui/app/auth/signup/components/signup.tsx index c19f4082bb99..52a486b743b6 100644 --- a/ee/tabby-ui/app/auth/signup/components/signup.tsx +++ b/ee/tabby-ui/app/auth/signup/components/signup.tsx @@ -2,14 +2,14 @@ import { useSearchParams } from 'next/navigation' -import { UserAuthForm } from './user-register-form' import AdminRegister from './admin-register' +import { UserAuthForm } from './user-register-form' export default function Signup() { const searchParams = useSearchParams() const invitationCode = searchParams.get('invitationCode') || undefined const isAdmin = searchParams.get('isAdmin') || false - + if (isAdmin) return if (invitationCode) { return ( diff --git a/ee/tabby-ui/app/auth/signup/components/user-register-form.tsx b/ee/tabby-ui/app/auth/signup/components/user-register-form.tsx index a5093a9b3a4d..1e35d8b3b893 100644 --- a/ee/tabby-ui/app/auth/signup/components/user-register-form.tsx +++ b/ee/tabby-ui/app/auth/signup/components/user-register-form.tsx @@ -50,9 +50,9 @@ const formSchema = z.object({ }) interface UserAuthFormProps extends React.HTMLAttributes { - invitationCode?: string; - onSuccess?: () => void; - buttonClass?: string; + invitationCode?: string + onSuccess?: () => void + buttonClass?: string } export function UserAuthForm({ @@ -148,8 +148,9 @@ export function UserAuthForm({ />