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

change the "Load Photo"-button-text to "Change Photo" when a photo is already choosen

This commit is contained in:
thomasrosen 2021-01-21 20:56:13 +01:00
parent a8c72b4be1
commit a69d190fe9

View file

@ -66,8 +66,8 @@ return (
<p>It should best be a square image or your face in the middle. The photo is not saved and never leaves your computer.</p>
<label className="labelButton" tabIndex="0" style={{outline:'none'}}>
<span>Load Photo</span>
{!!photo ? <img src={originalPhoto} alt="Preview" /> : null}
<span>{!!photo ? 'Change Photo' : 'Load Photo'}</span>
<input onChange={handleImage} type="file" accept="image/*" style={{display: 'none'}} />
</label>