Skip to content

Commit 5e0bcae

Browse files
committed
feat(nx-dev): change login button to try nx cloud
1 parent 7fa83cd commit 5e0bcae

File tree

5 files changed

+33
-29
lines changed

5 files changed

+33
-29
lines changed

astro-docs/src/components/layout/Header.astro

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,13 +179,13 @@ const currentVersion = versions.find(v => v.current);
179179
Contact
180180
</a>
181181
<a
182-
href="https://cloud.nx.app?utm_source=nx-dev&utm_medium=header"
182+
href="https://cloud.nx.app/get-started?utm_source=nx-dev&utm_medium=header"
183183
target="_blank"
184184
rel="noopener noreferrer"
185185
class="inline-flex items-center justify-center px-2.5 py-1.5 text-sm font-medium rounded-md transition no-underline bg-blue-500 dark:bg-sky-500 text-white hover:bg-blue-600 dark:hover:bg-sky-600 shadow-sm"
186-
title="Login to Nx Cloud"
186+
title="Try Nx Cloud for free"
187187
>
188-
Login
188+
Try Nx Cloud for free
189189
</a>
190190
</div>
191191
<!-- Social Icons - Hide on screens smaller than 2xl (1536px) -->

nx-dev/nx-dev/pages/enterprise/index.tsx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,18 @@ import { sendCustomEvent } from '@nx/nx-dev-feature-analytics';
2121
export function Enterprise(): ReactElement {
2222
const router = useRouter();
2323

24+
const ctaConfig: ButtonLinkProps[] = [
25+
{
26+
href: '/contact',
27+
variant: 'secondary',
28+
size: 'small',
29+
title: 'Contact Us',
30+
children: <span>Contact</span>,
31+
onClick: () =>
32+
sendCustomEvent('contact-click', 'header-cta', 'page-header'),
33+
},
34+
];
35+
2436
const scrollCTAConfig: ButtonLinkProps[] = [
2537
{
2638
href: '/enterprise/trial',
@@ -60,7 +72,10 @@ export function Enterprise(): ReactElement {
6072
type: 'website',
6173
}}
6274
/>
63-
<EnterpriseLayout scrollCTAConfig={scrollCTAConfig}>
75+
<EnterpriseLayout
76+
headerCTAConfig={ctaConfig}
77+
scrollCTAConfig={scrollCTAConfig}
78+
>
6479
<div>
6580
<Hero />
6681
<CustomerLogos />

nx-dev/nx-dev/pages/nx-cloud/index.tsx

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,6 @@ import {
1717
import { ButtonLinkProps } from '@nx/nx-dev-ui-common';
1818

1919
export function NxCloud(): ReactElement {
20-
const scrollCTAConfig: ButtonLinkProps[] = [
21-
{
22-
href: 'https://cloud.nx.app/get-started',
23-
variant: 'primary',
24-
size: 'small',
25-
target: '_blank',
26-
title: 'Try Nx Cloud for free',
27-
children: 'Try Nx Cloud',
28-
},
29-
];
30-
3120
return (
3221
<>
3322
<NextSeo
@@ -52,7 +41,7 @@ export function NxCloud(): ReactElement {
5241
}}
5342
canonical="https://nx.dev/ai"
5443
/>
55-
<DefaultLayout hideBackground={true} scrollCTAConfig={scrollCTAConfig}>
44+
<DefaultLayout hideBackground={true}>
5645
<NxCloudHero />
5746

5847
<div className="">

nx-dev/ui-common/src/lib/headers/documentation-header.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -393,8 +393,8 @@ export function DocumentationHeader({
393393
Contact
394394
</ButtonLink>
395395
<ButtonLink
396-
href="https://cloud.nx.app/?utm_source=nx-dev&utm_medium=documentation-header&utm_campaign=try-nx-cloud"
397-
title="Login"
396+
href="https://cloud.nx.app/get-started?utm_source=nx-dev&utm_medium=documentation-header&utm_campaign=try-nx-cloud"
397+
title="Try Nx Cloud for free"
398398
variant="primary"
399399
size="small"
400400
onClick={() =>
@@ -405,7 +405,7 @@ export function DocumentationHeader({
405405
)
406406
}
407407
>
408-
Login
408+
Try Nx Cloud for free
409409
</ButtonLink>
410410
</nav>
411411
</div>

nx-dev/ui-common/src/lib/headers/header.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -105,25 +105,25 @@ export function Header({
105105
sendCustomEvent('contact-click', 'header-cta', 'page-header'),
106106
},
107107
{
108-
href: 'https://cloud.nx.app?utm_source=nx-dev&utm_medium=header',
108+
href: 'https://cloud.nx.app/get-started?utm_source=nx-dev&utm_medium=header',
109109
variant: 'primary',
110110
size: 'small',
111111
target: '_blank',
112-
title: 'Login to Nx Cloud',
113-
children: 'Login',
112+
title: 'Try Nx Cloud for free',
113+
children: 'Try Nx Cloud for free',
114114
onClick: () =>
115115
sendCustomEvent('login-click', 'header-cta', 'page-header'),
116116
},
117117
];
118118

119-
const getButtonsToRender = () => {
120-
if (ctaButtons && ctaButtons.length > 0) return ctaButtons;
121-
if (scrollCtaButtons && scrollCtaButtons.length > 0 && isScrolled)
122-
return scrollCtaButtons;
123-
return defaultCtaButtons;
124-
};
119+
// const getButtonsToRender = () => {
120+
// if (ctaButtons && ctaButtons.length > 0) return ctaButtons;
121+
// if (scrollCtaButtons && scrollCtaButtons.length > 0 && isScrolled)
122+
// return scrollCtaButtons;
123+
// return defaultCtaButtons;
124+
// };
125125

126-
const buttonsToRender = getButtonsToRender();
126+
// const buttonsToRender = getButtonsToRender();
127127

128128
return (
129129
<div className="fixed inset-x-0 top-0 isolate z-[5] flex px-4 print:hidden">

0 commit comments

Comments
 (0)