FitTrackee/mpwo_client/src/utils.js

16 lines
371 B
JavaScript
Raw Normal View History

2018-04-29 17:02:08 +02:00
export const apiUrl = `${process.env.REACT_APP_API_URL}/api/`
2018-05-03 14:07:31 +02:00
export const thunderforestApiKey = `${
process.env.REACT_APP_THUNDERFOREST_API_KEY
}`
2018-04-29 17:02:08 +02:00
2017-12-25 20:11:10 +01:00
export const isLoggedIn = () => !!window.localStorage.authToken
2018-01-14 12:48:52 +01:00
export function generateIds(arr) {
let i = 0
2018-01-14 17:19:02 +01:00
return arr.map(val => {
const obj = { id: i, value: val }
2018-01-14 12:48:52 +01:00
i++
return obj
})
}