diff --git a/apps/console/src/app/components/redirect-overview.tsx b/apps/console/src/app/components/redirect-overview.tsx index 57c7e2959d8..99a43afa8e7 100644 --- a/apps/console/src/app/components/redirect-overview.tsx +++ b/apps/console/src/app/components/redirect-overview.tsx @@ -6,6 +6,14 @@ import { NotFoundPage } from '@qovery/pages/layout' import { ENVIRONMENTS_GENERAL_URL, ENVIRONMENTS_URL, SETTINGS_GENERAL_URL, SETTINGS_URL } from '@qovery/shared/routes' import { LoaderSpinner, ToastEnum, toast } from '@qovery/shared/ui' +function LoadingScreen() { + return ( +
+ +
+ ) +} + export function RedirectOverview() { const { organizationId = '' } = useParams() const navigate = useNavigate() @@ -19,12 +27,8 @@ export function RedirectOverview() { } }, [organizationId, organizations, navigate, projects]) - if (isLoading) { - return ( -
- -
- ) + if (isLoading || !isFetched) { + return } if (error) { @@ -39,7 +43,7 @@ export function RedirectOverview() { return } - return null + return } export default RedirectOverview diff --git a/libs/pages/environments/src/lib/feature/page-general-feature/page-general-feature.tsx b/libs/pages/environments/src/lib/feature/page-general-feature/page-general-feature.tsx index b3ded355e4d..bbf8ac5bc53 100644 --- a/libs/pages/environments/src/lib/feature/page-general-feature/page-general-feature.tsx +++ b/libs/pages/environments/src/lib/feature/page-general-feature/page-general-feature.tsx @@ -11,7 +11,7 @@ export function PageGeneralFeature() { const { data: clusters = [] } = useClusters({ organizationId }) const { data: project } = useProject({ organizationId, projectId }) - return project && 0} /> + return 0} /> } export default PageGeneralFeature diff --git a/libs/pages/environments/src/lib/ui/container/container.tsx b/libs/pages/environments/src/lib/ui/container/container.tsx index 1da8db73c8d..b82c4cd441e 100644 --- a/libs/pages/environments/src/lib/ui/container/container.tsx +++ b/libs/pages/environments/src/lib/ui/container/container.tsx @@ -7,6 +7,7 @@ import { ShowAllVariablesToggle, VariablesActionToolbar, VariablesProvider } fro import { ENVIRONMENTS_DEPLOYMENT_RULES_CREATE_URL, ENVIRONMENTS_DEPLOYMENT_RULES_URL, + ENVIRONMENTS_GENERAL_URL, ENVIRONMENTS_URL, ENVIRONMENTS_VARIABLES_URL, } from '@qovery/shared/routes' @@ -29,8 +30,8 @@ export function Container({ children }: PropsWithChildren) { { icon: , name: 'Environments', - active: pathname === `${ENVIRONMENTS_URL(organizationId, projectId)}/general`, - link: `${ENVIRONMENTS_URL(organizationId, projectId)}/general`, + active: pathname === `${ENVIRONMENTS_URL(organizationId, projectId)}${ENVIRONMENTS_GENERAL_URL}`, + link: `${ENVIRONMENTS_URL(organizationId, projectId)}${ENVIRONMENTS_GENERAL_URL}`, }, { icon: , diff --git a/libs/pages/environments/src/lib/ui/page-general/page-general.tsx b/libs/pages/environments/src/lib/ui/page-general/page-general.tsx index e79ce56b055..cc0faaca1cf 100644 --- a/libs/pages/environments/src/lib/ui/page-general/page-general.tsx +++ b/libs/pages/environments/src/lib/ui/page-general/page-general.tsx @@ -3,7 +3,7 @@ import { EnvironmentList } from '@qovery/domains/environments/feature' export interface PageGeneralProps { clusterAvailable: boolean - project: Project + project?: Project } export function PageGeneral({ clusterAvailable, project }: PageGeneralProps) { diff --git a/libs/pages/layout/src/lib/ui/breadcrumb/breadcrumb.tsx b/libs/pages/layout/src/lib/ui/breadcrumb/breadcrumb.tsx index ebd4a41b712..58257320771 100644 --- a/libs/pages/layout/src/lib/ui/breadcrumb/breadcrumb.tsx +++ b/libs/pages/layout/src/lib/ui/breadcrumb/breadcrumb.tsx @@ -18,7 +18,6 @@ import { ENVIRONMENTS_URL, ENVIRONMENT_LOGS_URL, INFRA_LOGS_URL, - OVERVIEW_URL, SERVICES_GENERAL_URL, SERVICES_URL, SETTINGS_URL, @@ -100,7 +99,7 @@ export function Breadcrumb(props: BreadcrumbProps) { ? projects?.map((project: Project) => ({ name: project.name, link: { - url: OVERVIEW_URL(project.organization?.id, project.id), + url: ENVIRONMENTS_URL(project.organization?.id, project.id) + ENVIRONMENTS_GENERAL_URL, }, contentLeft: ( diff --git a/libs/shared/ui/src/lib/components/header/header.tsx b/libs/shared/ui/src/lib/components/header/header.tsx index 4735b9a7a12..445bb79f51c 100644 --- a/libs/shared/ui/src/lib/components/header/header.tsx +++ b/libs/shared/ui/src/lib/components/header/header.tsx @@ -11,7 +11,7 @@ export interface HeaderProps extends PropsWithChildren { export function Header({ title, buttons, actions, children }: HeaderProps) { return ( -
+
{children}