Fix link in source modal

pull/252/head
Uku Taht 6 years ago
parent 412b03c751
commit 915447ff00

@ -49,11 +49,14 @@ class ReferrersModal extends React.Component {
}
renderReferrer(referrer) {
const query = new URLSearchParams(window.location.search)
query.set('source', referrer.name)
return (
<tr className="text-sm" key={referrer.name}>
<td className="p-2">
<img src={`https://icons.duckduckgo.com/ip3/${referrer.url}.ico`} className="h-4 w-4 mr-2 align-middle inline" />
<Link className="hover:underline truncate" style={{maxWidth: '80%'}} to={`/${encodeURIComponent(this.props.site.domain)}/referrers/${referrer.name}${window.location.search}`}>{ referrer.name }</Link>
<Link className="hover:underline truncate" style={{maxWidth: '80%'}} to={{search: query.toString(), pathname: '/' + encodeURIComponent(this.props.site.domain)}}>{ referrer.name }</Link>
</td>
<td className="p-2 w-32 font-medium" align="right">{numberFormatter(referrer.count)}</td>
{this.showExtra() && <td className="p-2 w-32 font-medium" align="right">{this.formatBounceRate(referrer)}</td> }

Loading…
Cancel
Save