From b6aa9bba4b03632419bafe5bc6180d1edd6e16c4 Mon Sep 17 00:00:00 2001 From: Guilherme Leme Date: Tue, 21 Oct 2025 14:01:44 -0300 Subject: [PATCH] [add-more-info-template] added locales and a react boilerplate to start developing --- manifest.json | 2 +- src/index.tsx | 16 ++++++++++++++++ src/main/component.tsx | 20 ++++++++++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 src/main/component.tsx diff --git a/manifest.json b/manifest.json index 58c00fd..3a8e704 100644 --- a/manifest.json +++ b/manifest.json @@ -2,5 +2,5 @@ "requiredSdkVersion": "~0.0.73", "name": "", "javascriptEntrypointUrl": ".js", - "localesBaseUrl": "https://cdn.dominio.com/pluginabc/" + "localesBaseUrl": "locales" } diff --git a/src/index.tsx b/src/index.tsx index e69de29..b4a4925 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -0,0 +1,16 @@ +import * as React from 'react'; +import * as ReactDOM from 'react-dom/client'; +import MainComponent from './main/component'; + +const uuid = document.currentScript?.getAttribute('uuid') || 'root'; + +const pluginName = document.currentScript?.getAttribute('pluginName') || 'plugin'; + +const root = ReactDOM.createRoot(document.getElementById(uuid)); +root.render( + , +); diff --git a/src/main/component.tsx b/src/main/component.tsx new file mode 100644 index 0000000..8b20d39 --- /dev/null +++ b/src/main/component.tsx @@ -0,0 +1,20 @@ +import * as React from 'react'; + +import { BbbPluginSdk, PluginApi } from 'bigbluebutton-html-plugin-sdk'; + +interface MainComponentProps { + pluginUuid: string; +} + +function MainComponent( + { pluginUuid: uuid }: MainComponentProps, +): React.ReactElement { + BbbPluginSdk.initialize(uuid); + const pluginApi: PluginApi = BbbPluginSdk.getPluginApi(uuid); + + console.log('hello world', pluginApi); + + return null; +} + +export default MainComponent;