diff --git a/src/Journal/JournalCalendar.tsx b/src/Journal/JournalCalendar.tsx index d36de46..38d9999 100644 --- a/src/Journal/JournalCalendar.tsx +++ b/src/Journal/JournalCalendar.tsx @@ -16,6 +16,8 @@ function objValues(obj: any) { return Object.keys(obj).map((x) => obj[x]); } +const PersistCalendar = historyPersistor('Calendar')(Calendar); + class JournalCalendar extends React.PureComponent { props: { journal: EteSync.Journal, @@ -36,7 +38,6 @@ class JournalCalendar extends React.PureComponent { } render() { - const PersistCalendar = historyPersistor('Calendar')(Calendar); let items = this.props.entries; return ( diff --git a/src/Pim/PimMain.tsx b/src/Pim/PimMain.tsx index 32460f1..dc9222c 100644 --- a/src/Pim/PimMain.tsx +++ b/src/Pim/PimMain.tsx @@ -19,6 +19,8 @@ import { historyPersistor } from '../persist-state-history'; const addressBookTitle = 'Address Book'; const calendarTitle = 'Calendar'; +const PersistCalendar = historyPersistor('Calendar')(Calendar); + class PimMain extends React.PureComponent { props: { contacts: Array, @@ -77,8 +79,6 @@ class PimMain extends React.PureComponent { } as any, }; - const PersistCalendar = historyPersistor('Calendar')(Calendar); - return (