Skip to content

Commit

Permalink
chore: Remake package-lock.json from scratch (#2446)
Browse files Browse the repository at this point in the history
* remake package-lock.json from scratch

* fix type error due to nullable highlightedRange
  • Loading branch information
david-crespo authored Sep 16, 2024
1 parent a5c2361 commit 3fda42e
Show file tree
Hide file tree
Showing 4 changed files with 5,700 additions and 18,545 deletions.
20 changes: 14 additions & 6 deletions app/ui/lib/CalendarCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ export interface CalendarCellProps {
date: CalendarDate
}

function isRangeState(
state: CalendarState | RangeCalendarState
): state is RangeCalendarState {
return 'highlightedRange' in state
}

export function CalendarCell({ state, date }: CalendarCellProps) {
const ref = useRef<HTMLDivElement>(null)
const {
Expand All @@ -36,12 +42,14 @@ export function CalendarCell({ state, date }: CalendarCellProps) {

// The start and end date of the selected range will have
// an emphasized appearance.
const isSelectionStart = (state as RangeCalendarState).highlightedRange
? isSameDay(date, (state as RangeCalendarState).highlightedRange.start)
: isSelected
const isSelectionEnd = (state as RangeCalendarState).highlightedRange
? isSameDay(date, (state as RangeCalendarState).highlightedRange.end)
: isSelected
const isSelectionStart =
isRangeState(state) && state.highlightedRange
? isSameDay(date, state.highlightedRange.start)
: isSelected
const isSelectionEnd =
isRangeState(state) && state.highlightedRange
? isSameDay(date, state.highlightedRange.end)
: isSelected

// We add rounded corners on the left for the first day of the month,
// the first day of each week, and the start date of the selection.
Expand Down
2 changes: 1 addition & 1 deletion mockServiceWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* - Please do NOT serve this file on production.
*/

const PACKAGE_VERSION = '2.4.5'
const PACKAGE_VERSION = '2.4.7'
const INTEGRITY_CHECKSUM = '26357c79639bfa20d64c0efca2a87423'
const IS_MOCKED_RESPONSE = Symbol('isMockedResponse')
const activeClientIds = new Set()
Expand Down
Loading

0 comments on commit 3fda42e

Please sign in to comment.