Re-add persistence

This commit is contained in:
Philipp Heckel 2022-02-24 15:17:47 -05:00
parent fef46823eb
commit 0958c1d527
3 changed files with 24 additions and 18 deletions

View file

@ -153,6 +153,9 @@ const App = () => {
const toggleDrawer = () => {
setDrawerOpen(!drawerOpen);
};
useEffect(() => {
setSubscriptions(repository.loadSubscriptions());
}, [/* initial render only */]);
useEffect(() => {
connectionManager.refresh(subscriptions, handleNotification);
repository.saveSubscriptions(subscriptions);