Skip to content

Commit e5e4e73

Browse files
cleaned up code
1 parent 14000bb commit e5e4e73

File tree

7 files changed

+490
-71
lines changed

7 files changed

+490
-71
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,5 @@
2222
npm-debug.log*
2323
yarn-debug.log*
2424
yarn-error.log*
25+
26+
.eslintrc.json

package-lock.json

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

package.json

+10
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,15 @@
3636
"last 1 firefox version",
3737
"last 1 safari version"
3838
]
39+
},
40+
"devDependencies": {
41+
"@typescript-eslint/eslint-plugin": "^3.3.0",
42+
"@typescript-eslint/parser": "^3.3.0",
43+
"eslint": "^6.8.0",
44+
"eslint-config-airbnb": "^18.1.0",
45+
"eslint-plugin-import": "^2.21.2",
46+
"eslint-plugin-jsx-a11y": "^6.2.3",
47+
"eslint-plugin-react": "^7.20.0",
48+
"eslint-plugin-react-hooks": "^2.5.1"
3949
}
4050
}

src/components/App/App.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import FilteredFarmsService from '../../services/filtered-farms-service'
1919
import './App.css'
2020

2121
class App extends Component {
22-
2322
state = {
2423
farms: [],
2524
filteredFarms: [],
@@ -30,6 +29,7 @@ class App extends Component {
3029
showBackground: false,
3130
error: null,
3231
}
32+
3333

3434

3535

src/components/FarmListItem/FarmListItem.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import React from 'react'
2-
import { Link } from 'react-router-dom'
3-
import FarmerAvatar from '../../Images/FarmerAvatar.png'
4-
import './FarmListItem.css'
1+
import React from 'react';
2+
import { Link } from 'react-router-dom';
3+
import FarmerAvatar from '../../Images/FarmerAvatar.png';
4+
import './FarmListItem.css';
55

66
export default function FarmListItem(props) {
7-
const farm = props.info
8-
const profile = farm.profile_image ? farm.profile_image : FarmerAvatar
7+
const farm = props.info;
8+
const profile = farm.profile_image ? farm.profile_image : FarmerAvatar;
99
return (
1010
<div className="farm-list-item">
1111
<div className="farm-list-item__img--container">
@@ -27,7 +27,7 @@ export default function FarmListItem(props) {
2727
</div>
2828
</div>
2929
</div>
30-
)
30+
);
3131
}
3232

3333
FarmListItem.defaultProps = {
@@ -37,5 +37,5 @@ FarmListItem.defaultProps = {
3737
farm_name: '',
3838
products: [],
3939
id: '',
40-
}
41-
}
40+
},
41+
};

src/config.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
export default {
22
API_ENDPOINT: 'https://still-sierra-72735.herokuapp.com/api',
3-
// API_ENDPOINT: 'http://localhost:8000/api',
4-
TOKEN_KEY: 'farmpicks-client-auth-token'
5-
}
3+
TOKEN_KEY: 'farmpicks-client-auth-token',
4+
};

src/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import React from 'react';
22
import ReactDOM from 'react-dom';
33
import { BrowserRouter} from 'react-router-dom';
4-
import App from './components/App/App';
5-
import AppError from '../src/components/AppError/AppError'
64
import { library } from '@fortawesome/fontawesome-svg-core'
75
import { faSearch, faHeart as faHeartSolid, faChevronLeft, faCaretDown, faFilter, faUser } from '@fortawesome/free-solid-svg-icons'
86
import { faHeart as faHeartRegular } from '@fortawesome/free-regular-svg-icons'
7+
import App from './components/App/App';
8+
import AppError from '../src/components/AppError/AppError'
99
import './index.css';
1010

1111
library.add(

0 commit comments

Comments
 (0)