From 18460e0678efadfd2ad23c463c9e49a51b13851d Mon Sep 17 00:00:00 2001 From: = Date: Sat, 14 Dec 2024 20:10:01 +0530 Subject: [PATCH] feat: base for signup pages completed --- .../src/components/signup/TeamInviteStep.tsx | 18 +- .../src/components/signup/UserInfoStep.tsx | 10 +- frontend-v2/src/hooks/api/auth/queries.tsx | 6 +- .../src/hooks/api/identities/constants.tsx | 3 +- .../src/hooks/api/identities/enums.tsx | 8 +- .../src/hooks/api/identities/index.tsx | 10 +- .../src/hooks/api/identities/mutations.tsx | 116 +++++++ .../src/hooks/api/identities/queries.tsx | 29 ++ frontend-v2/src/hooks/api/identities/types.ts | 63 +++- .../src/hooks/api/migration/mutations.tsx | 7 +- frontend-v2/src/hooks/api/users/queries.tsx | 14 +- frontend-v2/src/hooks/api/users/types.ts | 3 +- .../src/hooks/api/workspace/mutations.tsx | 6 +- .../src/hooks/api/workspace/queries.tsx | 130 ++++--- .../src/hooks/api/workspace/query-keys.tsx | 3 +- frontend-v2/src/hooks/api/workspace/types.ts | 8 + frontend-v2/src/routeTree.gen.ts | 54 ++- frontend-v2/src/routes/signup/index.tsx | 174 ++++++++++ .../BackupPDFStep/BackupPDFStep.tsx | 71 ++++ .../sso/-components/BackupPDFStep/index.tsx | 1 + .../EmailConfirmationStep.tsx | 189 ++++++++++ .../EmailConfirmationStep/index.tsx | 1 + .../UserInfoSSOStep/UserInfoSSOStep.tsx | 324 ++++++++++++++++++ .../sso/-components/UserInfoSSOStep/index.tsx | 1 + frontend-v2/src/routes/signup/sso/index.tsx | 90 +++++ 25 files changed, 1243 insertions(+), 96 deletions(-) create mode 100644 frontend-v2/src/routes/signup/index.tsx create mode 100644 frontend-v2/src/routes/signup/sso/-components/BackupPDFStep/BackupPDFStep.tsx create mode 100644 frontend-v2/src/routes/signup/sso/-components/BackupPDFStep/index.tsx create mode 100644 frontend-v2/src/routes/signup/sso/-components/EmailConfirmationStep/EmailConfirmationStep.tsx create mode 100644 frontend-v2/src/routes/signup/sso/-components/EmailConfirmationStep/index.tsx create mode 100644 frontend-v2/src/routes/signup/sso/-components/UserInfoSSOStep/UserInfoSSOStep.tsx create mode 100644 frontend-v2/src/routes/signup/sso/-components/UserInfoSSOStep/index.tsx create mode 100644 frontend-v2/src/routes/signup/sso/index.tsx diff --git a/frontend-v2/src/components/signup/TeamInviteStep.tsx b/frontend-v2/src/components/signup/TeamInviteStep.tsx index 60276d217..94d8a5040 100644 --- a/frontend-v2/src/components/signup/TeamInviteStep.tsx +++ b/frontend-v2/src/components/signup/TeamInviteStep.tsx @@ -1,6 +1,6 @@ -import React, { useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; -import { useRouter } from "next/router"; +import { useNavigate } from "@tanstack/react-router"; import { useAddUsersToOrg } from "@app/hooks/api"; import { useFetchServerStatus } from "@app/hooks/api/serverDetails"; @@ -13,7 +13,7 @@ import { Button, EmailServiceSetupModal } from "../v2"; */ export default function TeamInviteStep(): JSX.Element { const { t } = useTranslation(); - const router = useRouter(); + const navigate = useNavigate(); const [emails, setEmails] = useState(""); const { data: serverDetails } = useFetchServerStatus(); @@ -22,7 +22,7 @@ export default function TeamInviteStep(): JSX.Element { // Redirect user to the getting started page const redirectToHome = async () => { - router.push(`/org/${localStorage.getItem("orgData.id")}/overview`); + navigate({ to: `/org/${localStorage.getItem("orgData.id")}/overview` }); }; const inviteUsers = async ({ emails: inviteEmails }: { emails: string }) => { @@ -48,19 +48,19 @@ export default function TeamInviteStep(): JSX.Element {

{t("signup.step5-subtitle")}

-
+
-
+
Emails