Skip to content

Commit 0e34967

Browse files
agiannelli-auth0KelsiAnderson
authored andcommitted
fix: hide View Profile link for noTenant users
1 parent e8f85e7 commit 0e34967

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

ui/src/components/ui/profile-menu.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ function UserDetails({
2929
profileUrl,
3030
}: UserDetailsProps) {
3131
const initials = getInitials(name);
32+
// When a user has not created tenants, their profileUrl is "#"
33+
// We do not want to show the View Profile link in that case
34+
const validProfileUrl = profileUrl !== "#";
3235
return (
3336
<div
3437
className={cn(
@@ -47,15 +50,15 @@ function UserDetails({
4750
>
4851
{name}
4952
</ContentText>
50-
<ContentText
53+
{validProfileUrl ? <ContentText
5154
variant="link-sm"
5255
className="adu:text-foreground-bold adu:underline"
5356
asChild
5457
>
5558
<a href={profileUrl} target="_blank" rel="noreferrer">
5659
View Profile
5760
</a>
58-
</ContentText>
61+
</ContentText> : null}
5962
</div>
6063
</div>
6164
);
@@ -166,7 +169,7 @@ function ProfileMenuContent({
166169
) : (
167170
<>
168171
<DropdownMenuItem
169-
className="adu:gap-2 adu:px-3 adu:py-2 adu:pt-3">
172+
className="adu:gap-2 adu:px-3 adu:py-3 adu:pt-3">
170173
<ContentText
171174
variant="text-sm-bold"
172175
className="adu:text-foreground-bold"

0 commit comments

Comments
 (0)