trim the traling slash from the display URL

Relates #156
This commit is contained in:
yosefalnajjarofficial 2020-01-10 13:21:38 +02:00
parent b3445e4628
commit eeb5b21943

View file

@ -18,10 +18,9 @@ export default function Person({ person, currentTag }) {
{person.name} {person.emoji}
</a>
</h3>
<a
className="displayLink"
href={person.url}
>{`${url.host}${url.pathname}`}</a>
<a className="displayLink" href={person.url}>{`${
url.host
}${url.pathname.slice(0, url.pathname.lastIndexOf('/'))}`}</a>
</header>
<p>{person.description}</p>
<Tags>
@ -77,6 +76,7 @@ Person.propTypes = {
emoji: PropTypes.string,
description: PropTypes.string,
tags: PropTypes.arrayOf(PropTypes.string),
country: PropTypes.string,
computer: PropTypes.oneOf(['apple', 'windows', 'linux']),
phone: PropTypes.oneOf(['iphone', 'android']),
twitter(props, propName, componentName) {