diff --git a/app/components/Post.jsx b/app/components/Post.jsx index 7d48cda..b72bf2b 100644 --- a/app/components/Post.jsx +++ b/app/components/Post.jsx @@ -6,6 +6,10 @@ import { push } from 'react-router-redux' import PropTypes from 'prop-types' import moment from 'moment' import { createAction as action } from 'redux-actions' +import Linkify from 'react-linkify' + + +// - Material UI import { Card, CardActions, CardHeader, CardMedia, CardTitle, CardText } from 'material-ui/Card' import FloatingActionButton from 'material-ui/FloatingActionButton' import SvgShare from 'material-ui/svg-icons/social/share' @@ -370,21 +374,24 @@ static propTypes = { - {reactStringReplace(body,/#(\w+)/g, (match, i) => ( - { - evt.preventDefault() - goTo(`/tag/${match}`) - setHomeTitle(`#${match}`) - }} - > - #{match} - + + {reactStringReplace(body,/#(\w+)/g, (match, i) => ( + { + evt.preventDefault() + goTo(`/tag/${match}`) + setHomeTitle(`#${match}`) + }} + > + #{match} + + - ))} + ))} +
diff --git a/package.json b/package.json index 908be1e..e7a039d 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,7 @@ "react-avatar-editor": "^9.1.1", "react-dom": "^15.4.2", "react-event-listener": "^0.4.5", + "react-linkify": "^0.2.1", "react-parallax": "^1.4.1", "react-redux": "^5.0.4", "react-router": "^4.1.1 ",