* chore * chore * feat: paginated event types * fix: event types page * fix: k bar * fix: event type order * fix: type error * chore: remove commented code * chore: type err * chore: type err and feedback * feat: add old component * chore: missing import * fix: add isInfiniteScrollEnabled prop * chore: type err * chore: type error * feat: auto fetch next page when button is in view * Update packages/lib/server/repository/eventType.ts * Update packages/lib/server/repository/eventType.ts * chore: feedback * fix: managed event types * fix: Review fixes for event-types-infinite-scroll (#16047) * Review fixes * chore: missing import --------- Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com> Co-authored-by: Udit Takkar <udit222001@gmail.com> * chore: type error * chore * fix: delete event type * fix: create event dialog * fix: create and duplicate dialog * chore: simplify return type * fix: type * chore: invalidate query * chore: remove query * fix duplicated event not showing. --------- Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: Hariom Balhara <hariombalhara@gmail.com>
31 lines
1.0 KiB
TypeScript
31 lines
1.0 KiB
TypeScript
import { getUserAvatarUrl } from "@calcom/lib/getAvatarUrl";
|
|
import { getBookerBaseUrlSync } from "@calcom/lib/getBookerUrl/client";
|
|
import type { User } from "@calcom/prisma/client";
|
|
import type { UserProfile } from "@calcom/types/UserProfile";
|
|
import { AvatarGroup } from "@calcom/ui";
|
|
|
|
type UserAvatarProps = Omit<React.ComponentProps<typeof AvatarGroup>, "items"> & {
|
|
users: (Pick<User, "name" | "username" | "avatarUrl"> & {
|
|
profile: Omit<UserProfile, "upId">;
|
|
hideTruncatedAvatarsCount?: boolean;
|
|
})[];
|
|
};
|
|
export function UserAvatarGroup(props: UserAvatarProps) {
|
|
const { users, ...rest } = props;
|
|
|
|
return (
|
|
<AvatarGroup
|
|
{...rest}
|
|
items={users.map((user) => ({
|
|
href: `${getBookerBaseUrlSync(user.profile?.organization?.slug ?? null)}/${
|
|
user.profile?.username
|
|
}?redirect=false`,
|
|
alt: user.name || "",
|
|
title: user.name || "",
|
|
image: getUserAvatarUrl(user),
|
|
hideTruncatedAvatarsCount: user.hideTruncatedAvatarsCount,
|
|
}))}
|
|
/>
|
|
);
|
|
}
|