Skip to content

Commit

Permalink
pull addons on initialize
Browse files Browse the repository at this point in the history
  • Loading branch information
nklhtv committed Nov 8, 2021
1 parent 9c6e83c commit b64ff05
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/App/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,16 @@ const App = () => {
services.chromecast.off('stateChanged', onChromecastStateChange);
};
}, []);
React.useEffect(() => {
if (services.core.active) {
services.core.transport.dispatch({
action: 'Ctx',
args: {
action: 'PullAddonsFromAPI'
}
});
}
}, [initialized]);
return (
<React.StrictMode>
<ServicesProvider services={services}>
Expand Down

0 comments on commit b64ff05

Please sign in to comment.