diff options
| author | bobzel <zzzman@gmail.com> | 2024-04-24 18:12:30 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2024-04-24 18:12:30 -0400 |
| commit | b1376d401e709515cee078cc08b05fd3fb89caeb (patch) | |
| tree | d9ed253a539d506589a6c4251b9598dd5d0111f7 /src/client/views/collections/CollectionCalendarView.tsx | |
| parent | aa4f7b37483c516b92181d3374d3151972b98383 (diff) | |
completing eslint pass
Diffstat (limited to 'src/client/views/collections/CollectionCalendarView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionCalendarView.tsx | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/src/client/views/collections/CollectionCalendarView.tsx b/src/client/views/collections/CollectionCalendarView.tsx index 578ce77a5..43e5a68eb 100644 --- a/src/client/views/collections/CollectionCalendarView.tsx +++ b/src/client/views/collections/CollectionCalendarView.tsx @@ -25,16 +25,13 @@ export class CollectionCalendarView extends CollectionSubView() { removeCalendar = () => {}; - addCalendar = (doc: Doc | Doc[], annotationKey?: string | undefined): boolean => { + addCalendar = (/* doc: Doc | Doc[], annotationKey?: string | undefined */): boolean => // bring up calendar modal with option to create a calendar - return true; - }; + true; _stackRef = React.createRef<CollectionStackingView>(); - panelHeight = () => { - return this._props.PanelHeight() - 40; // this should be the height of the stacking view. For now, it's the hieight of the calendar view minus 40 to allow for a title - }; + panelHeight = () => this._props.PanelHeight() - 40; // this should be the height of the stacking view. For now, it's the hieight of the calendar view minus 40 to allow for a title // most recent calendar should come first sortByMostRecentDate = (calendarA: Doc, calendarB: Doc) => { @@ -46,18 +43,18 @@ export class CollectionCalendarView extends CollectionSubView() { if (aFromDate > bFromDate) { return -1; // a comes first - } else if (aFromDate < bFromDate) { + } + if (aFromDate < bFromDate) { + return 1; // b comes first + } + // start dates are the same + if (aToDate > bToDate) { + return -1; // a comes first + } + if (aToDate < bToDate) { return 1; // b comes first - } else { - // start dates are the same - if (aToDate > bToDate) { - return -1; // a comes first - } else if (aToDate < bToDate) { - return 1; // b comes first - } else { - return 0; // same start and end dates - } } + return 0; // same start and end dates }; screenToLocalTransform = () => @@ -74,6 +71,7 @@ export class CollectionCalendarView extends CollectionSubView() { return ( <div className="collectionCalendarView"> <CollectionStackingView + // eslint-disable-next-line react/jsx-props-no-spreading {...this._props} setContentViewBox={emptyFunction} ref={this._stackRef} |
