feat: update current time indicator on page refocus (#27503)
Add updateCurrentTimeOnFocus prop to Calendar component that enables the current time indicator to update when the page is refocused. This helps users see the accurate current time after switching tabs. Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Peer Richelsen <[email protected]>
This commit is contained in:
4 files changed
+48
-22
No files matched your search
@@ -1,14 +1,12 @@
|
||||
"use client";
|
||||
|
||||
import { useMemo, useEffect } from "react";
|
||||
|
||||
import dayjs from "@calcom/dayjs";
|
||||
import { useTimePreferences } from "@calcom/features/bookings/lib";
|
||||
import { Calendar } from "@calcom/web/modules/calendars/weeklyview/components/Calendar";
|
||||
import type { CalendarEvent } from "@calcom/features/calendars/weeklyview/types/events";
|
||||
import { useGetTheme } from "@calcom/lib/hooks/useTheme";
|
||||
import { Calendar } from "@calcom/web/modules/calendars/weeklyview/components/Calendar";
|
||||
import { useBanners } from "@calcom/web/modules/shell/banners/useBanners";
|
||||
|
||||
import { useEffect, useMemo } from "react";
|
||||
import { useBookingDetailsSheetStore } from "../store/bookingDetailsSheetStore";
|
||||
import type { BookingOutput } from "../types";
|
||||
|
||||
@@ -101,6 +99,7 @@ export function BookingCalendarView({
|
||||
}}
|
||||
showTimezone
|
||||
hideHeader
|
||||
updateCurrentTimeOnFocus
|
||||
/>
|
||||
</div>
|
||||
</>
|
||||
|
||||
Reference in new issue
Block a user