From bc4650cc1dd6325be957fda6b6ec955180543016 Mon Sep 17 00:00:00 2001 From: Nicholas Cunningham Date: Mon, 8 Jul 2024 16:24:31 -0600 Subject: [PATCH] feat(nx-dev): Add menu redirects --- nx-dev/ui-cloud/src/lib/hero.tsx | 1 + nx-dev/ui-cloud/src/lib/statistics.tsx | 8 +++----- nx-dev/ui-common/src/lib/footer.tsx | 2 +- nx-dev/ui-common/src/lib/headers/menu-items.ts | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/nx-dev/ui-cloud/src/lib/hero.tsx b/nx-dev/ui-cloud/src/lib/hero.tsx index 049f7bfa5affa..cfb9f4fac49d1 100644 --- a/nx-dev/ui-cloud/src/lib/hero.tsx +++ b/nx-dev/ui-cloud/src/lib/hero.tsx @@ -74,6 +74,7 @@ export function Hero(): JSX.Element { width={2550} height={1622} loading="eager" + priority />
diff --git a/nx-dev/ui-cloud/src/lib/statistics.tsx b/nx-dev/ui-cloud/src/lib/statistics.tsx index 845dba97e9123..c896913c09422 100644 --- a/nx-dev/ui-cloud/src/lib/statistics.tsx +++ b/nx-dev/ui-cloud/src/lib/statistics.tsx @@ -45,12 +45,10 @@ function fetchTimeSaved(): Promise<{ }> ) .catch(() => ({ - // TODO: Remove this mock data once the API is ready. - // Below is the latest data as of 2024-07-08. date: new Date(), - last7days: 184326783183, - last30days: 853784967976, - sinceStart: 27250634509494, + last7days: Math.round(Math.random() * 1000000000), + last30days: Math.round(Math.random() * 100000000000), + sinceStart: Math.round(Math.random() * 10000000000000), })); } diff --git a/nx-dev/ui-common/src/lib/footer.tsx b/nx-dev/ui-common/src/lib/footer.tsx index 3be04b6ec8914..2e2c66cde1ae4 100644 --- a/nx-dev/ui-common/src/lib/footer.tsx +++ b/nx-dev/ui-common/src/lib/footer.tsx @@ -8,7 +8,7 @@ export function Footer(): JSX.Element { solutions: [ { name: 'Nx Enterprise', href: '/enterprise' }, { name: 'Nx', href: 'https://nx.dev' }, - { name: 'Nx Cloud', href: 'https://nx.app/?utm_source=nx.dev' }, + { name: 'Nx Cloud', href: '/nx-cloud' }, ], resources: [ { name: 'Blog', href: '/blog' }, diff --git a/nx-dev/ui-common/src/lib/headers/menu-items.ts b/nx-dev/ui-common/src/lib/headers/menu-items.ts index 355e5898a5380..0ce4d55866893 100644 --- a/nx-dev/ui-common/src/lib/headers/menu-items.ts +++ b/nx-dev/ui-common/src/lib/headers/menu-items.ts @@ -105,7 +105,7 @@ export const plans: MenuItem[] = [ name: 'Nx Cloud', description: 'End-to-end solution for smart, efficient and maintainable CI.', - href: 'https://nx.app', + href: '/nx-cloud', icon: null, isNew: false, isHighlight: false,