Conditional getStartedClick working on features list

This commit is contained in:
Steve Klebanoff
2018-12-17 13:44:19 -08:00
parent 6d66476d35
commit c126d01fe3

View File

@@ -20,6 +20,15 @@ import { ModalContact } from '../components/modals/modal_contact';
const CONFIGURATOR_MIN_WIDTH_PX = 1050;
export const getStartedClick = () => {
if (window.innerWidth < CONFIGURATOR_MIN_WIDTH_PX) {
utils.openUrl(`${WebsitePaths.Wiki}#Get-Started-With-Instant`);
} else {
sharedUtils.setUrlHash('configurator');
sharedUtils.scrollToHash('configurator', '');
}
};
const featuresData = [
{
title: 'Support ERC-20 and ERC-721 tokens',
@@ -29,7 +38,8 @@ const featuresData = [
links: [
{
label: 'Get Started',
url: '#',
onClick: getStartedClick,
useAnchorTag: true,
},
{
label: 'Explore the Docs',
@@ -75,15 +85,6 @@ interface Props {
};
}
export const getStartedClick = () => {
if (window.innerWidth < CONFIGURATOR_MIN_WIDTH_PX) {
utils.openUrl(`${WebsitePaths.Wiki}#Get-Started-With-Instant`);
} else {
sharedUtils.setUrlHash('configurator');
sharedUtils.scrollToHash('configurator', '');
}
};
export class Next0xInstant extends React.Component<Props> {
public state = {
isContactModalOpen: false,