Use lodash to get random element from array
parent
d238907f61
commit
f19bd728e4
|
@ -1,3 +1,5 @@
|
|||
import _ from 'lodash'
|
||||
|
||||
const emptyFunny = [
|
||||
'Looks like you dont have any queries. Be a lot cooler if you did.',
|
||||
'Create a query below. Go on, I dare ya!',
|
||||
|
@ -5,7 +7,4 @@ const emptyFunny = [
|
|||
'1) Create a query below \n2) Profit',
|
||||
]
|
||||
|
||||
const getRandomInt = (min, max) =>
|
||||
Math.floor(Math.random() * (max - min + 1)) + min
|
||||
|
||||
export const emptyGraphCopy = emptyFunny[getRandomInt(0, 3)]
|
||||
export const emptyGraphCopy = _.sample(emptyFunny)
|
||||
|
|
Loading…
Reference in New Issue