Skip to content

Commit

Permalink
Refetch calendar data every minute
Browse files Browse the repository at this point in the history
  • Loading branch information
joyvuu-dave committed Aug 13, 2017
1 parent 4575e0e commit 08b6e47
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/javascript/components/residents/calendar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,19 @@ class ResidentsCalendar extends React.Component {
}
]
});

setInterval(() => this.refetch(calendar), 60000);
}

logout() {
Cookie.remove("token", { domain: `.comeals${window.topLevel}` });
window.location.href = "/";
}

refetch(calendar) {
$(calendar).fullCalendar("refetchEvents");
}

render() {
return (
<div className="offwhite">
Expand Down

0 comments on commit 08b6e47

Please sign in to comment.