diff --git a/src/components/InstallButton.js b/src/components/InstallButton.js index 423ba0556..938a23c2a 100644 --- a/src/components/InstallButton.js +++ b/src/components/InstallButton.js @@ -103,11 +103,6 @@ const InstallButton = ({ quickstart, location, ...props }) => { quickstart.installPlans.length === 1 && quickstart.installPlans[0].id.includes('guided-install'); - // If there is nothing to install AND no documentation, don't show this button. - if (!hasInstallableComponent && !hasComponent(quickstart, 'documentation')) { - return null; - } - let nerdletId = hasGuidedInstall ? NR1_GUIDED_INSTALL_NERDLET : NR1_PACK_DETAILS_NERDLET; @@ -129,6 +124,18 @@ const InstallButton = ({ quickstart, location, ...props }) => { ) : quickstart.documentation[0].url; + const [installUrl, setInstallUrl] = useState(SIGNUP_LINK); + useEffect(() => { + setInstallUrl(url); + + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); + + // If there is nothing to install AND no documentation, don't show this button. + if (!hasInstallableComponent && !hasComponent(quickstart, 'documentation')) { + return null; + } + const writeCookie = () => { const currentEnvironment = process.env.ENV || process.env.NODE_ENV || 'development'; @@ -156,7 +163,7 @@ const InstallButton = ({ quickstart, location, ...props }) => {