diff --git a/package.json b/package.json index e8f52da..dda6ebd 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,8 @@ "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject", - "lint": "eslint ." + "lint": "eslint .", + "lint:fix": "eslint . --fix" }, "eslintConfig": { "extends": "react-app" diff --git a/src/components/AddGroup.js b/src/components/AddGroup.js index e3b7599..9cdee5b 100644 --- a/src/components/AddGroup.js +++ b/src/components/AddGroup.js @@ -36,7 +36,7 @@ export const AddGroup = withRouter((props) => { }} >
- + { @@ -45,7 +45,7 @@ export const AddGroup = withRouter((props) => { * required
- + { diff --git a/src/components/AddResponse.js b/src/components/AddResponse.js index 4c26ff7..284833c 100644 --- a/src/components/AddResponse.js +++ b/src/components/AddResponse.js @@ -2,8 +2,8 @@ import React, { useState } from 'react'; import { withRouter } from "react-router" import { useMutation } from '@apollo/react-hooks'; import { errorHandler } from '../services/graphql/errorHandler' -import { CREATE_POST } from '../services/graphql/queries'; -import { THREAD } from '../services/graphql/queries'; +import { CREATE_POST , THREAD } from '../services/graphql/queries'; + export const AddResponse = withRouter((props) => { const [showResponseForm, setShowResponseForm] = useState(false) @@ -50,7 +50,7 @@ export const AddResponse = withRouter((props) => { onClick={() => setShowResponseForm(!showResponseForm)}>share your response } - let body =
+ const body =
{responseForm}
diff --git a/src/components/ContactForm.js b/src/components/ContactForm.js index 60373f6..1332336 100644 --- a/src/components/ContactForm.js +++ b/src/components/ContactForm.js @@ -4,7 +4,7 @@ export const ContactForm = (props) => { return (
- +
); diff --git a/src/components/GroupPreview.js b/src/components/GroupPreview.js index c84c0d7..a93b0e9 100644 --- a/src/components/GroupPreview.js +++ b/src/components/GroupPreview.js @@ -4,24 +4,24 @@ import { Thread } from './Thread'; export const GroupPreview = withRouter((props) => { let activeConversations - let threadTitles = [] + const threadTitles = [] if (props.threads.length > 0) { for (let i=0; i < props.threads.length && i < 3; i++) { threadTitles.push( -
  • {props.threads[i].title}
  • +
  • {props.threads[i].title}
  • ) } activeConversations =
    -
    +
    Active Conversations
    -
      +
        {threadTitles}
    } - let url = "/community/" + props.groupId + const url = `/community/${ props.groupId}` return (
    diff --git a/src/components/Groups.js b/src/components/Groups.js index 0c8878c..b3bffb9 100644 --- a/src/components/Groups.js +++ b/src/components/Groups.js @@ -18,7 +18,7 @@ export const Groups = withRouter((props) => { if (error) return

    Error :(

    ; if (data.groups.length > 0) { - let groupCards = [] + const groupCards = [] data.groups.forEach((group, i) =>{ groupCards.push( { threads={group.threads} />) if((i+1) % 3 == 0){ groupCards.push( -
    +
    ) } }); @@ -39,11 +39,11 @@ export const Groups = withRouter((props) => {
    ); - } else { + } return (

    welcome.

    ) - } + }); diff --git a/src/components/Index.js b/src/components/Index.js index ef436df..3bcdffd 100644 --- a/src/components/Index.js +++ b/src/components/Index.js @@ -9,7 +9,7 @@ export const Index = withRouter((props) => {

    Hawthorn is a place for communities;

    a platform with commitment to social justice, premised on mutual support and owned by you, the community

    -