Use the username for slugs to highlights

This commit is contained in:
Jackson Harper
2023-03-09 18:25:59 +08:00
parent 3667dc32a7
commit c0187bd1e7

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()