Last active
October 10, 2022 14:35
-
-
Save koss-lebedev/f6d85a73c4e6d222dd6eea890426e051 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 TextMessage = ({ text }) => { | |
return ( | |
<div> | |
<p>{text}</p> | |
</div> | |
) | |
} | |
const ImageMessage = ({ text, imageUrl }) => { | |
return ( | |
<div> | |
<img src={imageUrl} /> | |
{text && <p>{text}</p>} | |
</div> | |
) | |
} | |
const AudioMessage = ({ audioUrl }) => { | |
return ( | |
<div> | |
<audio controls> | |
<source src={audioUrl} /> | |
</audio> | |
</div> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment