codacy issues fix

This commit is contained in:
SamR1
2018-01-14 17:19:02 +01:00
parent ec37423dfc
commit a51f2869bf
6 changed files with 20 additions and 15 deletions

View File

@ -1,4 +1,6 @@
FROM node:latest
FROM node:9.4.0
MAINTAINER SamR1
# set working directory
RUN mkdir /usr/src/app
@ -14,12 +16,12 @@ ENV NODE_ENV $NODE_ENV
ENV REACT_APP_API_URL $REACT_APP_API_URL
# install and cache app dependencies
ADD package.json /usr/src/app/package.json
COPY package.json /usr/src/app/package.json
RUN yarn install --silent
RUN yarn global add react-scripts
# add app
ADD . /usr/src/app/
COPY . /usr/src/app/
# start app
CMD yarn start

View File

@ -1,13 +1,10 @@
export const isLoggedIn = () => !!window.localStorage.authToken
export function generateIds(arr) {
let i = 0
let arrWithIds = arr.map(arr => {
const obj = { id: i, value: arr }
return arr.map(val => {
const obj = { id: i, value: val }
i++
return obj
})
return arrWithIds
}