[CAL-153] Wrong redirect when clicking user or teams avatar in event types (#5348)
Co-authored-by: gitstart <[email protected]> Co-authored-by: gitstart <[email protected]> Co-authored-by: Nitesh Singh <[email protected]> Co-authored-by: Matheus Muniz <[email protected]> Co-authored-by: Rafael Toledo <[email protected]> Co-authored-by: Matheus Benini Ferreira <[email protected]> Co-authored-by: Murilo Amaral <[email protected]> Co-authored-by: Matheus Benini <[email protected]> Co-authored-by: Rubens Rafael <[email protected]> Co-authored-by: Thiago Nascimbeni <[email protected]> Co-authored-by: Rafael <[email protected]> Co-authored-by: Grace Nshokano <[email protected]> Co-authored-by: MuriloAmarals <[email protected]> Co-authored-by: gitstart <[email protected]> Co-authored-by: Nitesh Singh <[email protected]> Co-authored-by: Matheus Muniz <[email protected]> Co-authored-by: Rafael Toledo <[email protected]> Co-authored-by: Matheus Benini Ferreira <[email protected]> Co-authored-by: Murilo Amaral <[email protected]> Co-authored-by: Matheus Benini <[email protected]> Co-authored-by: Rubens Rafael <[email protected]> Co-authored-by: Thiago Nascimbeni <[email protected]> Co-authored-by: gitstart <[email protected]> Co-authored-by: Rafael <[email protected]> Co-authored-by: Grace Nshokano <[email protected]> Co-authored-by: MuriloAmarals <[email protected]> Co-authored-by: Matheus Muniz <[email protected]> Co-authored-by: Júlio Piubello da Silva Cabral <[email protected]>
This commit is contained in:
1 file changed
+9
-3
@@ -38,6 +38,7 @@ type EventTypeGroupProfile = EventTypeGroups[number]["profile"];
|
||||
interface EventTypeListHeadingProps {
|
||||
profile: EventTypeGroupProfile;
|
||||
membershipCount: number;
|
||||
teamId?: number | null;
|
||||
}
|
||||
|
||||
type EventTypeGroup = inferQueryOutput<"viewer.eventTypes">["eventTypeGroups"][number];
|
||||
@@ -501,10 +502,14 @@ export const EventTypeList = ({ group, groupIndex, readOnly, types }: EventTypeL
|
||||
);
|
||||
};
|
||||
|
||||
const EventTypeListHeading = ({ profile, membershipCount }: EventTypeListHeadingProps): JSX.Element => {
|
||||
const EventTypeListHeading = ({
|
||||
profile,
|
||||
membershipCount,
|
||||
teamId,
|
||||
}: EventTypeListHeadingProps): JSX.Element => {
|
||||
return (
|
||||
<div className="mb-4 flex">
|
||||
<Link href="/settings/teams">
|
||||
<Link href={teamId ? `/settings/teams/${teamId}/profile` : "/settings/my-account/profile"}>
|
||||
<a>
|
||||
<Avatar
|
||||
alt={profile?.name || ""}
|
||||
@@ -515,7 +520,7 @@ const EventTypeListHeading = ({ profile, membershipCount }: EventTypeListHeading
|
||||
</a>
|
||||
</Link>
|
||||
<div>
|
||||
<Link href="/settings/teams">
|
||||
<Link href={teamId ? `/settings/teams/${teamId}/profile` : "/settings/my-account/profile"}>
|
||||
<a className="font-bold">{profile?.name || ""}</a>
|
||||
</Link>
|
||||
{membershipCount && (
|
||||
@@ -587,6 +592,7 @@ const EventTypesPage = () => {
|
||||
<EventTypeListHeading
|
||||
profile={group.profile}
|
||||
membershipCount={group.metadata.membershipCount}
|
||||
teamId={group.teamId}
|
||||
/>
|
||||
)}
|
||||
<EventTypeList
|
||||
|
||||
Reference in new issue
Block a user