Skip to content

Commit 918e5b4

Browse files
committed
trying to link to page
1 parent f756ae1 commit 918e5b4

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"version": "0.1.0",
66
"author": "Kyle Mathews <mathews.kyle@gmail.com>",
77
"dependencies": {
8+
"@reach/router": "^1.3.4",
89
"gatsby": "^2.19.45",
910
"gatsby-image": "^2.2.44",
1011
"gatsby-plugin-manifest": "^2.2.48",

src/components/landing/hero.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React from "react"
2+
import { navigate } from "@reach/router"
23
import HeadingOne from "../typography/HeadingOne"
34
import BodyOne from "../typography/BodyOne"
45
import RedBlockButton from "../buttons/RedBlockButton"
@@ -23,7 +24,12 @@ const Hero = () => (
2324
a design system using Apollo. Everything you learn here will not be a
2425
waste of time, it is 100% reproducible for production use cases.{" "}
2526
</BodyOne>
26-
<RedBlockButton className="mr-5">Learn now!</RedBlockButton>
27+
<RedBlockButton
28+
className="mr-5"
29+
onClick={() => navigate(`/introduction`)}
30+
>
31+
Learn now!
32+
</RedBlockButton>
2733

2834
<RedOutlineButton
2935
className="s:mt-5 lg:ml-5 "

yarn.lock

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1343,6 +1343,16 @@
13431343
prop-types "^15.6.1"
13441344
react-lifecycles-compat "^3.0.4"
13451345

1346+
"@reach/router@^1.3.4":
1347+
version "1.3.4"
1348+
resolved "https://registry.yarnpkg.com/@reach/router/-/router-1.3.4.tgz#d2574b19370a70c80480ed91f3da840136d10f8c"
1349+
integrity sha512-+mtn9wjlB9NN2CNnnC/BRYtwdKBfSyyasPYraNAyvaV1occr/5NnB4CVzjEZipNHwYebQwcndGUmpFzxAUoqSA==
1350+
dependencies:
1351+
create-react-context "0.3.0"
1352+
invariant "^2.2.3"
1353+
prop-types "^15.6.1"
1354+
react-lifecycles-compat "^3.0.4"
1355+
13461356
"@sindresorhus/is@^0.14.0":
13471357
version "0.14.0"
13481358
resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea"

0 commit comments

Comments
 (0)