Skip to content

Commit

Permalink
fix(use-redirect): remove onboarding dependencie
Browse files Browse the repository at this point in the history
  • Loading branch information
RemiBonnet committed Dec 22, 2022
1 parent 1dec62f commit 9667ced
Showing 1 changed file with 1 addition and 8 deletions.
Expand Up @@ -5,7 +5,7 @@ import { useNavigate } from 'react-router-dom'
import { fetchOrganization } from '@qovery/domains/organization'
import { fetchProjects } from '@qovery/domains/projects'
import { useAuth } from '@qovery/shared/auth'
import { ONBOARDING_URL, ORGANIZATION_URL, OVERVIEW_URL } from '@qovery/shared/router'
import { ORGANIZATION_URL, OVERVIEW_URL } from '@qovery/shared/router'
import { AppDispatch } from '@qovery/store'
import {
getCurrentOrganizationIdFromStorage,
Expand All @@ -19,7 +19,6 @@ export function useRedirectIfLogged() {
const dispatch = useDispatch<AppDispatch>()

useEffect(() => {
const isOnboarding = process.env?.['NX_ONBOARDING'] === 'true'
async function fetchData() {
let organization: Organization[] = []

Expand All @@ -37,12 +36,6 @@ export function useRedirectIfLogged() {
if (projects.length > 0) navigate(OVERVIEW_URL(organizationId, projects[0].id))
else navigate(ORGANIZATION_URL(organizationId))
}
if (isOnboarding && organization.length === 0) {
navigate(ONBOARDING_URL)
}
// if (isOnboarding && organization.length > 0) {
// window.location.replace(`${process.env['NX_URL'] || 'https://console.qovery.com'}?redirectLoginV3`)
// }
}
if (checkIsAuthenticated) {
const currentOrganization = getCurrentOrganizationIdFromStorage()
Expand Down

0 comments on commit 9667ced

Please sign in to comment.