mirror of
https://github.com/voltbonn/profile-picture-generator.git
synced 2024-12-22 07:45:04 +00:00
fix: write out the hashtags that are not a tag but a phrase
This commit is contained in:
parent
0664879db0
commit
31992bda35
1 changed files with 10 additions and 1 deletions
|
@ -1,6 +1,12 @@
|
||||||
import { useState, useEffect, useCallback } from 'react'
|
import { useState, useEffect, useCallback } from 'react'
|
||||||
import { withLocalization } from './Localized.js'
|
import { withLocalization } from './Localized.js'
|
||||||
|
|
||||||
|
const hashtagNameReplacers = {
|
||||||
|
'IVotedFromAbroad': 'I voted from abroad!',
|
||||||
|
'PeaceInEurope': 'Peace in Europe',
|
||||||
|
'FriedenInEuropa': 'Frieden in Europa',
|
||||||
|
}
|
||||||
|
|
||||||
function HashtagChooser({ onChange, getString }) {
|
function HashtagChooser({ onChange, getString }) {
|
||||||
const [frames, setFrames] = useState([])
|
const [frames, setFrames] = useState([])
|
||||||
const [choosenFrame, setChoosenFrame] = useState(null)
|
const [choosenFrame, setChoosenFrame] = useState(null)
|
||||||
|
@ -25,8 +31,11 @@ function HashtagChooser({ onChange, getString }) {
|
||||||
if (frame_filename !== '') {
|
if (frame_filename !== '') {
|
||||||
src = (await import(`./hashtags/${frame_filename}.png`)).default
|
src = (await import(`./hashtags/${frame_filename}.png`)).default
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const name = hashtagNameReplacers[frame_filename] || frame_filename
|
||||||
|
|
||||||
return {
|
return {
|
||||||
name: frame_filename,
|
name,
|
||||||
src
|
src
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue