Consume changed plugins message in the UI

Summary: Relay message to the React app via postmessage. Later, we will subscribe to these messages and update the plugins

Reviewed By: lblasa

Differential Revision: D39539590

fbshipit-source-id: c6742e45330e71b63c135c0267e6e9c5817fc9ff
This commit is contained in:
Andrey Goncharov
2022-09-15 10:02:19 -07:00
committed by Facebook GitHub Bot
parent c69d102ca1
commit d3d2e189d0
2 changed files with 25 additions and 5 deletions

View File

@@ -68,6 +68,13 @@
suppressErrors = true;
});
socket.on('plugins-source-updated', (pluginsChanged) => {
window.postMessage({
type: 'plugins-source-updated',
data: pluginsChanged
})
})
function openError(text) {
if (suppressErrors) {
return;
@@ -105,4 +112,4 @@
</script>
</body>
</html>
</html>