Skip to content

Commit

Permalink
feat: add required field to contact form
Browse files Browse the repository at this point in the history
  • Loading branch information
v4iv committed Apr 4, 2019
1 parent 9d9e5d1 commit 9ed9bec
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# gatsby-starter-business
A [Gatsby v2](https://www.gatsbyjs.org/) and [Netlify CMS](https://www.netlifycms.org) powered generic business website starter based on [gatsby-starter-netlify-cms](https://github.com/AustinGreen/gatsby-starter-netlify-cms).
A [Gatsby v2](https://www.gatsbyjs.org/) and [Netlify CMS](https://www.netlifycms.org) powered generic business website.

It follows the [JAMstack architecture](https://jamstack.org) by using Git as a single source of truth, and [Netlify](https://www.netlify.com) for continuous deployment, and CDN distribution.

Expand Down Expand Up @@ -62,7 +62,7 @@ yarn clean
```

## Configuratuion
To personalize and configure this Starter open `data/config.js` file and replace the default values.
To personalize and configure this Starter open `config.js` file and replace the default values.

```javascript
module.exports = {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion gatsby-config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const config = require('./data/config')
const config = require('./config')

const pathPrefix = config.pathPrefix === '/' ? '' : config.pathPrefix

Expand Down
4 changes: 2 additions & 2 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ exports.createPages = ({actions, graphql}) => {
}

const postsAndPages = result.data.allMarkdownRemark.edges

// Post pages:
let posts = []
// Iterate through each post/page, putting all found posts (where templateKey = article-page) into `posts`
Expand All @@ -43,7 +43,7 @@ exports.createPages = ({actions, graphql}) => {
posts = posts.concat(edge)
}
})

createPaginatedPages({
edges: posts,
createPage: createPage,
Expand Down
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
publish = "public"
command = "gatsby build"
[build.environment]
YARN_VERSION = "1.9.4"
YARN_VERSION = "1.15.0"
YARN_FLAGS = "--no-ignore-optional"
2 changes: 1 addition & 1 deletion src/components/ContactPageTemplate/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class ContactPageTemplate extends Component {
<button className='button is-text' type='reset'>Cancel</button>
</div>
<div className='control'>
<button className='button is-primary' type='submit'>Submit</button>
<button className='button is-primary' type='submit' disabled={(!this.state.name) || (!this.state.email) || (!this.state.message)}>Submit</button>
</div>
</div>
</form>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Disqus/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, {Component} from 'react'
import ReactDisqusComments from 'react-disqus-comments'
import config from '../../../data/config'
import config from '../../../config'

class Disqus extends Component {
constructor (props) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Footer/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import config from '../../../data/config'
import config from '../../../config'

const Footer = () => {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/components/Layout/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Component, Fragment } from 'react'
import Helmet from 'react-helmet'
import '../../assets/sass/styles.sass'
import config from '../../../data/config'
import config from '../../../config'
import NavBar from '../NavBar'
import Footer from '../Footer'

Expand Down
2 changes: 1 addition & 1 deletion src/components/SEO/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import config from '../../../data/config'
import config from '../../../config'
import Helmet from 'react-helmet'

const SE0 = ({ title, meta_title, meta_desc, cover, slug, date }) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Share/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
LinkedinIcon,
RedditIcon,
} from 'react-share'
import config from '../../../data/config'
import config from '../../../config'
import './styles.sass'

class Share extends Component {
Expand Down
2 changes: 1 addition & 1 deletion src/templates/blog.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, {Component} from 'react'
import {Link} from 'gatsby'
import config from '../../data/config'
import config from '../../config'
import Helmet from 'react-helmet'
import PostCard from '../components/PostCard'
import Layout from '../components/Layout'
Expand Down

0 comments on commit 9ed9bec

Please sign in to comment.