Skip to content

Commit

Permalink
Merge pull request #153 from Revyy/fix-anonymous-user-breaking-userlink
Browse files Browse the repository at this point in the history
fix: add user prefix to entityRef in UserLink
  • Loading branch information
drodil authored Apr 24, 2024
2 parents 5f5561a + 5567737 commit 77f517f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/qeta/src/components/Links/Links.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ export const UserLink = (props: {
}) => {
const { entityRef, linkProps } = props;
const userRoute = useRouteRef(userRouteRef);
const { primaryTitle: userName } = useEntityPresentation(entityRef);
const { primaryTitle: userName } = useEntityPresentation(
entityRef.startsWith('user:') ? entityRef : `user:${entityRef}`,
);
if (entityRef === 'anonymous') {
return <>Anonymous</>;
}
Expand Down

0 comments on commit 77f517f

Please sign in to comment.