Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2023-09-04 09:24:31 +02:00
parent 4912292503
commit 814feeed73
19 changed files with 75 additions and 38 deletions
+3 -2
View File
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { DateTime } from 'luxon';
import { GCalendar, GCalendarEvent } from '../src/api';
@@ -38,11 +39,11 @@ export const eventsMock: GCalendarEvent[] = [...Array(3).keys()].map(i => ({
start: {
dateTime: DateTime.now()
.minus({ hour: i + 1 })
.toISO(),
.toISO()!,
timeZone: 'Europe/London',
},
end: {
dateTime: DateTime.now().minus({ hour: i }).toISO(),
dateTime: DateTime.now().minus({ hour: i }).toISO()!,
timeZone: 'Europe/London',
},
description: '<h3>Dummy title</h3><p>Dummy description</p>',
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { sortBy } from 'lodash';
import { DateTime } from 'luxon';
import React, { useState } from 'react';
@@ -67,9 +68,9 @@ export const CalendarCard = () => {
calendars,
selectedCalendars: storedCalendars,
enabled: isSignedIn && calendars.length > 0,
timeMin: date.startOf('day').toISO(),
timeMax: date.endOf('day').toISO(),
timeZone: date.zoneName,
timeMin: date.startOf('day').toISO()!,
timeMax: date.endOf('day').toISO()!,
timeZone: date.zoneName ?? 'UTC', // TODO: Use browser timezone? This probably never happens anyway
});
const showLoader =
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { compact, unescape } from 'lodash';
import { useMemo } from 'react';
import { useQueries } from '@tanstack/react-query';