Linkify urls in playlist comments

This commit is contained in:
Deluan
2022-10-07 16:12:07 -04:00
parent c530ccf138
commit 53a4ea673b
3 changed files with 8 additions and 5 deletions
@@ -13,7 +13,7 @@ const useStyles = makeStyles(
{ name: 'RaLink' }
)
const AnchorMe = ({ text, ...rest }) => {
const Linkify = ({ text, ...rest }) => {
const classes = useStyles()
const linkify = useCallback((text) => {
const urlRegex =
@@ -66,8 +66,8 @@ const AnchorMe = ({ text, ...rest }) => {
return <>{parsedText}</>
}
AnchorMe.propTypes = {
Linkify.propTypes = {
text: PropTypes.string,
}
export default React.memo(AnchorMe)
export default React.memo(Linkify)