Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion apps/web/components/booking/BookingListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,9 @@ function BookingListItem(booking: BookingItemProps) {
const title = booking.title;

const isCalVideoLocation =
!booking.location || booking.location === "integrations:daily" || booking?.location?.trim() === "";
!booking.location ||
booking.location === "integrations:daily" ||
(typeof booking.location === "string" && booking.location.trim() === "");
Comment on lines 349 to +352
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Eliminate code duplication with actionContext.

The same isCalVideoLocation logic is duplicated between lines 247-250 (in actionContext) and here. Consider removing this standalone variable and using actionContext.isCalVideoLocation instead.

Apply this diff to eliminate the duplication:

-  const isCalVideoLocation =
-    !booking.location ||
-    booking.location === "integrations:daily" ||
-    (typeof booking.location === "string" && booking.location.trim() === "");

Then update the references on lines 439 and 447:

-      {isCalVideoLocation && (
+      {actionContext.isCalVideoLocation && (
-      {isCalVideoLocation && meetingSessionDetailsDialogIsOpen && (
+      {actionContext.isCalVideoLocation && meetingSessionDetailsDialogIsOpen && (

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In apps/web/components/booking/BookingListItem.tsx around lines 349 to 352, the
isCalVideoLocation logic is duplicated from lines 247 to 250 in actionContext.
Remove the standalone isCalVideoLocation variable here and replace its usage
with actionContext.isCalVideoLocation. Also update all references to
isCalVideoLocation on lines 439 and 447 to use actionContext.isCalVideoLocation
instead, eliminating the duplication.


const showPendingPayment = paymentAppData.enabled && booking.payment.length && !booking.paid;

Expand Down
Loading