Merge pull request #1889 from omnivore-app/fix/highlights-viewer-username

Use the username for slugs to highlights
This commit is contained in:
Jackson Harper 2023-03-09 18:29:34 +08:00 committed by GitHub
commit 315c54466e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -79,7 +79,7 @@ export function HighlightItem(props: HighlightItemProps): JSX.Element {
<StyledQuote
onClick={(event) => {
if (router && props.viewer) {
const dest = `/${props.viewer}/${props.item.slug}#${props.highlight.id}`
const dest = `/${props.viewer.profile.username}/${props.item.slug}#${props.highlight.id}`
router.push(dest)
}
event.preventDefault()