fix: onboarding redirection loop and bug fixes (#3250)

* chore: try and catch added in handleSignInRedirection

* chore: remove unnecessary hooks

* fix: handleCopyIssueLink url updated

* chore: swap next_url with next_path and validate redirection logic for next_path url
This commit is contained in:
Anmol Singh Bhatia 2023-12-28 17:17:04 +05:30 committed by GitHub
parent 71bf049e89
commit 91e84aede1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 69 additions and 42 deletions

View file

@ -11,8 +11,6 @@ import { Controller, useForm } from "react-hook-form";
import { useMobxStore } from "lib/mobx/store-provider";
// services
import { WorkspaceService } from "services/workspace.service";
// hooks
import useUserAuth from "hooks/use-user-auth";
// layouts
import DefaultLayout from "layouts/default-layout";
import { UserAuthWrapper } from "layouts/auth-layout";
@ -45,8 +43,6 @@ const OnboardingPage: NextPageWithLayout = observer(() => {
const { setTheme } = useTheme();
const {} = useUserAuth("onboarding");
const { control, setValue } = useForm<{ full_name: string }>({
defaultValues: {
full_name: "",
@ -158,8 +154,8 @@ const OnboardingPage: NextPageWithLayout = observer(() => {
currentUser?.first_name
? `${currentUser?.first_name} ${currentUser?.last_name ?? ""}`
: value.length > 0
? value
: currentUser?.email
? value
: currentUser?.email
}
src={currentUser?.avatar}
size={35}
@ -174,8 +170,8 @@ const OnboardingPage: NextPageWithLayout = observer(() => {
{currentUser?.first_name
? `${currentUser?.first_name} ${currentUser?.last_name ?? ""}`
: value.length > 0
? value
: null}
? value
: null}
</p>
)}