Skip to content

Commit

Permalink
Add 60 second interval to update items
Browse files Browse the repository at this point in the history
  • Loading branch information
campb303 committed Aug 2, 2021
1 parent fa26115 commit baaeea5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/components/AppView/AppView.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,16 @@ export default function AppView({ setDarkMode }) {
setItems(tempItems);
}, [queues]);

// Auto refresh items.
useEffect( _ => {
const timer = setInterval(_ => {
getQueues();
}, 1000 * 60)
return _ => {
clearInterval(timer);
}
}, [selectedQueues])

const theme = useTheme();
const transitionWidth = theme.transitions.create(["width"], {
duration: theme.transitions.duration.enteringScreen,
Expand Down

0 comments on commit baaeea5

Please sign in to comment.