Last active
October 10, 2022 14:36
-
-
Save koss-lebedev/e3eefed14b157f5022e8286796948616 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Message = ({ text, imageUrl, audioUrl }) => { | |
if (audioUrl) { | |
return ( | |
<div> | |
<audio controls> | |
<source src={audioUrl} /> | |
</audio> | |
</div> | |
) | |
} | |
return ( | |
<div> | |
{imageUrl && <img src={imageUrl} />} | |
{text && <p>{text}</p>} | |
</div> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment