Skip to content

Commit 085b25e

Browse files
committed
added tracking to redirect to demo
1 parent 297e56b commit 085b25e

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/components/buttons/RedOutlineButton.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import PropTypes from "prop-types"
22
import React from "react"
33

4-
const RedOutlineButton = ({ children, className }) => (
4+
const RedOutlineButton = ({ children, className, onClick }) => (
55
<button
6+
onClick={onClick}
67
className={`${className} cursor-pointer bg-white-full border border-red-light text-red-darkest focus:outline-none font-display rounded-px px-16 py-2 hover:bg-transparent hover:border hover:border-red-darkest`}
78
>
89
{children}
@@ -12,6 +13,7 @@ const RedOutlineButton = ({ children, className }) => (
1213
RedOutlineButton.propTypes = {
1314
children: PropTypes.string,
1415
className: PropTypes.string,
16+
onClick: PropTypes.func,
1517
}
1618

1719
RedOutlineButton.defaultProps = {

src/components/landing/hero.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import BodyOne from "../typography/BodyOne"
44
import RedBlockButton from "../buttons/RedBlockButton"
55
import RedOutlineButton from "../buttons/RedOutlineButton"
66
import HeroImage from "../../images/hero_image.svg"
7-
7+
import constants from "../../constants"
88
const Hero = () => (
99
<>
1010
<div className="flex lg:flex-row s:flex-col text-left">
@@ -24,7 +24,10 @@ const Hero = () => (
2424
</BodyOne>
2525
<RedBlockButton className="">Learn now!</RedBlockButton>
2626

27-
<RedOutlineButton className="s:mt-5 lg:ml-5">
27+
<RedOutlineButton
28+
className="s:mt-5 lg:ml-5"
29+
onClick={() => constants.track("App.RedirctToDemo")}
30+
>
2831
<a
2932
className="flex flex-row"
3033
target="_blank"

0 commit comments

Comments
 (0)