diff --git a/constants.js b/constants.js new file mode 100644 index 0000000..4a39715 --- /dev/null +++ b/constants.js @@ -0,0 +1,7 @@ +module.exports = { + facebook: 'https://www.facebook.com/Pi515/', + twitter: 'https://twitter.com/LOVEPI515', + phoneNumber: '515-344-4326', + address: '4300 Beaver Avenue Des Moines, IA 50310', + email: 'tech@pi515.org' +} \ No newline at end of file diff --git a/src/pages/contact/index.js b/src/pages/contact/index.js index 1b17e63..26f6753 100644 --- a/src/pages/contact/index.js +++ b/src/pages/contact/index.js @@ -1,6 +1,7 @@ import React from 'react' import { navigate } from 'gatsby-link' import Layout from '../../components/Layout' +import constants from '../../../constants' function encode(data) { return Object.keys(data) @@ -9,12 +10,6 @@ function encode(data) { } export default class Index extends React.Component { - facebook = 'https://www.facebook.com/Pi515/'; - twitter = 'https://twitter.com/LOVEPI515'; - phoneNumber = '515-344-4326'; - address = '4300 Beaver Avenue Des Moines, IA 50310'; - email = 'tech@pi515.org'; - constructor(props) { super(props); this.state = { isValidated: false } @@ -46,13 +41,13 @@ export default class Index extends React.Component {

Pursuit of Innovation

-
Phone number: {this.phoneNumber}
-
Email: {this.email}
-
Address: 4300 Beaver Avenue Des Moines, IA 50310
+
Phone number: {constants.phoneNumber}
+
Email: {constants.email}
+
Address: {constants.address}
Hours: 9am - 5pm
-
Facebook
-
Twitter
+
Facebook
+
Twitter