Skip to content

Commit fd69cbd

Browse files
author
Evert Arias
committed
Update
1 parent a0c29c0 commit fd69cbd

File tree

4 files changed

+24
-10
lines changed

4 files changed

+24
-10
lines changed

package-lock.json

+9-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"dependencies": {
88
"gatsby": "^2.19.45",
99
"gatsby-image": "^2.2.44",
10+
"gatsby-link": "^2.3.1",
1011
"gatsby-plugin-manifest": "^2.2.48",
1112
"gatsby-plugin-offline": "^3.0.41",
1213
"gatsby-plugin-react-helmet": "^3.1.24",

src/components/ContactForm/index.jsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React from "react"
2+
import { navigate } from 'gatsby-link';
23

34
function encode(data) {
45
return Object.keys(data)
@@ -24,7 +25,7 @@ const ContactForm = () => {
2425
...state,
2526
}),
2627
})
27-
.then(() => console.log("navigate"))
28+
.then(() => navigate(form.getAttribute('action')))
2829
.catch(error => alert(error))
2930
}
3031
return (

src/pages/thanks.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import React from "react"
2+
import Layout from "../components/layout"
3+
4+
const Thanks = () => {
5+
return (
6+
<Layout>
7+
<p>Your info has been submitted!</p>
8+
</Layout>
9+
)
10+
}
11+
12+
export default Thanks

0 commit comments

Comments
 (0)