fixes display link

This commit is contained in:
Wes Bos 2020-01-10 10:49:39 -05:00
parent 154411c8a3
commit 7b7b164751

View file

@ -23,10 +23,11 @@ export default function Person({ person, currentTag }) {
rel="noopener noreferrer" rel="noopener noreferrer"
className="displayLink" className="displayLink"
href={person.url} href={person.url}
>{`${url.host}${url.pathname.slice( >{`${url.host}${
0, url.pathname.endsWith('/')
url.pathname.lastIndexOf('/') ? url.pathname.substr(0, url.pathname.length - 1)
)}`}</a> : url.pathname
}`}</a>
</header> </header>
<p>{person.description}</p> <p>{person.description}</p>
<Tags> <Tags>