feat: add demo account button on onboarding

This commit is contained in:
Ahmed Bouhuolia
2024-08-20 22:01:36 +02:00
parent 3f23038227
commit 3200d65d90
6 changed files with 73 additions and 5 deletions

View File

@@ -1,9 +1,13 @@
// @ts-nocheck
import React from 'react';
import { Icon, For, FormattedMessage as T } from '@/components';
import { Icon, For, FormattedMessage as T, Stack } from '@/components';
import { getFooterLinks } from '@/constants/footerLinks';
import { useAuthActions } from '@/hooks/state';
import style from './SetupLeftSection.module.scss';
import { Text } from '@blueprintjs/core';
import { Config } from '@/config';
import { useHistory } from 'react-router-dom';
/**
* Footer item link.
@@ -25,8 +29,21 @@ function SetupLeftSectionFooter() {
// Retrieve the footer links.
const footerLinks = getFooterLinks();
const handleDemoBtnClick = () => {
window.open(Config.oneClickDemo.demoUrl);
};
return (
<div className={'content__footer'}>
{Config.oneClickDemo.demoUrl && (
<Stack spacing={16}>
<Text className={style.demoButtonLabel}>Not Now?</Text>
<button className={style.demoButton} onClick={handleDemoBtnClick}>
Try Demo Account
</button>
</Stack>
)}
<div className={'content__links'}>
<For render={FooterLinkItem} of={footerLinks} />
</div>