|
|
|
@ -96,7 +96,7 @@ const Messaggio = ({ messaggiApprovati }) => { |
|
|
|
img.onload = (i) => { |
|
|
|
img.onload = (i) => { |
|
|
|
console.log("loaded"); |
|
|
|
console.log("loaded"); |
|
|
|
console.log(img.width, img.height); |
|
|
|
console.log(img.width, img.height); |
|
|
|
setImageWidth(img.width > img.height ? 600 : 200); |
|
|
|
setImageWidth(img.width > img.height ? 600 : 400); |
|
|
|
showNextMessage(newMessage); |
|
|
|
showNextMessage(newMessage); |
|
|
|
}; |
|
|
|
}; |
|
|
|
img.src = newMessage.immagineURL; |
|
|
|
img.src = newMessage.immagineURL; |
|
|
|
@ -144,16 +144,18 @@ const Messaggio = ({ messaggiApprovati }) => { |
|
|
|
> |
|
|
|
> |
|
|
|
{messaggioDaMostrare.testo} |
|
|
|
{messaggioDaMostrare.testo} |
|
|
|
</h1> |
|
|
|
</h1> |
|
|
|
<p |
|
|
|
{messaggioDaMostrare.autore && ( |
|
|
|
style={{ |
|
|
|
<p |
|
|
|
display: "inline-block", |
|
|
|
style={{ |
|
|
|
background: "black", |
|
|
|
display: "inline-block", |
|
|
|
padding: "0px 6px", |
|
|
|
background: "black", |
|
|
|
paddingBottom: "4px", |
|
|
|
padding: "0px 6px", |
|
|
|
}} |
|
|
|
paddingBottom: "4px", |
|
|
|
> |
|
|
|
}} |
|
|
|
da {messaggioDaMostrare.autore} |
|
|
|
> |
|
|
|
</p> |
|
|
|
da {messaggioDaMostrare.autore} |
|
|
|
|
|
|
|
</p> |
|
|
|
|
|
|
|
)} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
)} |
|
|
|
)} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|