Skip to content

Commit 3fda42e

Browse files
authored
chore: Remake package-lock.json from scratch (#2446)
* remake package-lock.json from scratch * fix type error due to nullable highlightedRange
1 parent a5c2361 commit 3fda42e

File tree

4 files changed

+5700
-18545
lines changed

4 files changed

+5700
-18545
lines changed

app/ui/lib/CalendarCell.tsx

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ export interface CalendarCellProps {
2222
date: CalendarDate
2323
}
2424

25+
function isRangeState(
26+
state: CalendarState | RangeCalendarState
27+
): state is RangeCalendarState {
28+
return 'highlightedRange' in state
29+
}
30+
2531
export function CalendarCell({ state, date }: CalendarCellProps) {
2632
const ref = useRef<HTMLDivElement>(null)
2733
const {
@@ -36,12 +42,14 @@ export function CalendarCell({ state, date }: CalendarCellProps) {
3642

3743
// The start and end date of the selected range will have
3844
// an emphasized appearance.
39-
const isSelectionStart = (state as RangeCalendarState).highlightedRange
40-
? isSameDay(date, (state as RangeCalendarState).highlightedRange.start)
41-
: isSelected
42-
const isSelectionEnd = (state as RangeCalendarState).highlightedRange
43-
? isSameDay(date, (state as RangeCalendarState).highlightedRange.end)
44-
: isSelected
45+
const isSelectionStart =
46+
isRangeState(state) && state.highlightedRange
47+
? isSameDay(date, state.highlightedRange.start)
48+
: isSelected
49+
const isSelectionEnd =
50+
isRangeState(state) && state.highlightedRange
51+
? isSameDay(date, state.highlightedRange.end)
52+
: isSelected
4553

4654
// We add rounded corners on the left for the first day of the month,
4755
// the first day of each week, and the start date of the selection.

mockServiceWorker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* - Please do NOT serve this file on production.
99
*/
1010

11-
const PACKAGE_VERSION = '2.4.5'
11+
const PACKAGE_VERSION = '2.4.7'
1212
const INTEGRITY_CHECKSUM = '26357c79639bfa20d64c0efca2a87423'
1313
const IS_MOCKED_RESPONSE = Symbol('isMockedResponse')
1414
const activeClientIds = new Set()

0 commit comments

Comments
 (0)