Skip to content

Commit 12fd239

Browse files
committed
adding form submission page
1 parent 1d28566 commit 12fd239

File tree

4 files changed

+33
-1
lines changed

4 files changed

+33
-1
lines changed

src/components/app.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import Home from '../routes/home';
88
import Blogs from '../routes/blogs';
99
import Blog from '../routes/blog';
1010
import Contact from '../routes/contact';
11+
import ContactSuccess from '../routes/contact-success';
1112

1213
export default class App extends Component {
1314

@@ -29,6 +30,7 @@ export default class App extends Component {
2930
<Blogs path="/blogs/" />
3031
<Blog path="/blog/:name" />
3132
<Contact path="/contact/" />
33+
<ContactSuccess path="/contact/success" />
3234
</Router>
3335
</div>
3436
</Provider>

src/routes/contact-success/index.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { h } from 'preact';
2+
import style from './style';
3+
4+
const photographs = (props) => {
5+
return (
6+
<div class={style.pageContact}>
7+
<h1 class={style.pageTitle}>Thanks! I'll be in touch soon.</h1>
8+
</div>
9+
);
10+
};
11+
12+
export default photographs;

src/routes/contact-success/style.css

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.pageContact {
2+
padding: 0 5%;
3+
}
4+
5+
.pageTitle {
6+
position: relative;
7+
display: inline-block;
8+
font-weight: 500;
9+
}
10+
11+
.pageTitle:after {
12+
position: absolute;
13+
bottom: -5px;
14+
left: 0px;
15+
content: '';
16+
width: 75%;
17+
border-bottom: 2px solid #FFC107;
18+
}

src/routes/contact/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const photographs = (props) => {
1212
<div>&nbsp;</div>
1313
<div>Cheers 🍻</div>
1414
</p>
15-
<form name="contact" method="POST" data-netlify="true">
15+
<form name="contact" method="POST" data-netlify="true" action="/contact/success">
1616
<p>
1717
<input type="text" name="name" placeholder="Name" required />
1818
</p>

0 commit comments

Comments
 (0)