Skip to content

Commit

Permalink
fix: platform booker icons and styling (calcom#18276)
Browse files Browse the repository at this point in the history
  • Loading branch information
ThyMinimalDev authored and MuhammadAimanSulaiman committed Feb 20, 2025
1 parent 457bce6 commit 1635170
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,9 @@ function RenderIcon({
}) {
const isPlatform = useIsPlatform();

if (isPlatform) {
if (eventLocationType.type === "conferencing") return <Icon name="video" className="me-[10px] h-4 w-4" />;
if (eventLocationType.type === "attendeeInPerson" || eventLocationType.type === "inPerson")
return <Icon name="map-pin" className="me-[10px] h-4 w-4" />;
if (eventLocationType.type === "phone" || eventLocationType.type === "userPhone")
return <Icon name="phone" className="me-[10px] h-4 w-4" />;
if (eventLocationType.type === "link") return <Icon name="link" className="me-[10px] h-4 w-4" />;
return <Icon name="book-user" className="me-[10px] h-4 w-4" />;
}

return (
<img
src={eventLocationType.iconUrl}
src={`${isPlatform ? process.env.NEXT_PUBLIC_WEBAPP_URL : ""}${eventLocationType.iconUrl}`}
className={classNames(invertLogoOnDark(eventLocationType?.iconUrl, isTooltip), "me-[10px] h-4 w-4")}
alt={`${eventLocationType.label} icon`}
/>
Expand Down
3 changes: 1 addition & 2 deletions packages/platform/atoms/globals.css

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions packages/platform/examples/base/src/pages/booking.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export default function Bookings(props: { calUsername: string; calEmail: string
{!bookingTitle && eventTypeSlug && !rescheduleUid && (
<>
<Booker
bannerUrl="https://i0.wp.com/mahala.co.uk/wp-content/uploads/2014/12/img_banner-thin_mountains.jpg?fit=800%2C258&ssl=1"
eventSlug={eventTypeSlug}
onCreateBookingSuccess={(data) => {
setBookingTitle(data.data.title ?? "");
Expand Down Expand Up @@ -130,6 +131,7 @@ export default function Bookings(props: { calUsername: string; calEmail: string
router.push(`/${data.data.uid}`);
}}
duration={eventTypeDuration}
bannerUrl="https://i0.wp.com/mahala.co.uk/wp-content/uploads/2014/12/img_banner-thin_mountains.jpg?fit=800%2C258&ssl=1"
/>
)}
{bookingTitle && <p>Booking created: {bookingTitle}</p>}
Expand Down

0 comments on commit 1635170

Please sign in to comment.