1
0
Fork 0
mirror of https://github.com/voltbonn/profile-picture-generator.git synced 2024-12-21 23:35:05 +00:00

fix: write out the hashtags that are not a tag but a phrase

This commit is contained in:
thomasrosen 2023-10-03 12:50:36 +02:00
parent 0664879db0
commit 31992bda35

View file

@ -1,6 +1,12 @@
import { useState, useEffect, useCallback } from 'react'
import { withLocalization } from './Localized.js'
const hashtagNameReplacers = {
'IVotedFromAbroad': 'I voted from abroad!',
'PeaceInEurope': 'Peace in Europe',
'FriedenInEuropa': 'Frieden in Europa',
}
function HashtagChooser({ onChange, getString }) {
const [frames, setFrames] = useState([])
const [choosenFrame, setChoosenFrame] = useState(null)
@ -25,8 +31,11 @@ function HashtagChooser({ onChange, getString }) {
if (frame_filename !== '') {
src = (await import(`./hashtags/${frame_filename}.png`)).default
}
const name = hashtagNameReplacers[frame_filename] || frame_filename
return {
name: frame_filename,
name,
src
}
})