1
0
Fork 0
mirror of https://github.com/voltbonn/profile-picture-generator.git synced 2024-12-22 15:55:08 +00:00

moved parsing the hashtags directly into the array

This is to prevent eslint errors.
This commit is contained in:
thomasrosen 2021-04-21 02:50:15 +02:00
parent 0bd7cb6e2d
commit c71b11d217

View file

@ -11,15 +11,14 @@ function HashtagChooser({ onChange, getString }) {
useEffect(() => { useEffect(() => {
async function loadFrames() { async function loadFrames() {
hashtags = hashtags.split('\n')
.map(tag => tag.trim())
.filter(tag => tag.length > 0)
Promise.all( Promise.all(
[ [
'', '',
...hashtags ...(
hashtags.split('\n')
.map(tag => tag.trim())
.filter(tag => tag.length > 0)
)
] ]
.map(async frame_filename => { .map(async frame_filename => {
let src = frame_filename let src = frame_filename