diff --git a/addons-web-sdk/samples/hello-world-next-js/src/app/mainstage/page.tsx b/addons-web-sdk/samples/hello-world-next-js/src/app/mainstage/page.tsx index 7031323..193698a 100644 --- a/addons-web-sdk/samples/hello-world-next-js/src/app/mainstage/page.tsx +++ b/addons-web-sdk/samples/hello-world-next-js/src/app/mainstage/page.tsx @@ -8,18 +8,17 @@ import { CLOUD_PROJECT_NUMBER } from '../../constants'; * See: https://developers.google.com/meet/add-ons/guides/overview#main-stage */ export default function Page() { + /** + * Prepares the Add-on Main Stage Client, which signals that the add-on has + * successfully launched in the main stage. + */ useEffect(() => { - /** - * Prepares the Add-on Main Stage Client, which signals that the add-on has - * successfully launched in the main stage. - */ - async function initializeMainStage() { + (async () => { const session = await meet.addon.createAddonSession({ cloudProjectNumber: CLOUD_PROJECT_NUMBER, }); await session.createMainStageClient(); - } - initializeMainStage(); + })(); }, []); return ( diff --git a/addons-web-sdk/samples/hello-world-next-js/src/app/sidepanel/page.tsx b/addons-web-sdk/samples/hello-world-next-js/src/app/sidepanel/page.tsx index ae01e96..c5c08b8 100644 --- a/addons-web-sdk/samples/hello-world-next-js/src/app/sidepanel/page.tsx +++ b/addons-web-sdk/samples/hello-world-next-js/src/app/sidepanel/page.tsx @@ -21,17 +21,16 @@ export default function Page() { await sidePanelClient.startActivity({ mainStageUrl: MAIN_STAGE_URL }); } + /** + * Prepares the Add-on Side Panel Client. + */ useEffect(() => { - /** - * Prepares the Add-on Side Panel Client. - */ - async function setUpAddon() { + (async () => { const session = await meet.addon.createAddonSession({ cloudProjectNumber: CLOUD_PROJECT_NUMBER, }); setSidePanelClient(await session.createSidePanelClient()); - } - setUpAddon(); + })(); }, []); return ( diff --git a/addons-web-sdk/samples/hello-world/src/MainStage.html b/addons-web-sdk/samples/hello-world/src/MainStage.html index 1b05e78..b9a1136 100644 --- a/addons-web-sdk/samples/hello-world/src/MainStage.html +++ b/addons-web-sdk/samples/hello-world/src/MainStage.html @@ -1,23 +1,21 @@ + + + Meet Add-on Main Stage + + - - - Meet Add-on Main Stage - - + +
This is the Add-on Main Stage. Everyone in the call can see this.
+
Hello, world!
- -
This is the Add-on Main Stage. Everyone in the call can see this.
-
Hello, world!
- - - - - \ No newline at end of file + + + diff --git a/addons-web-sdk/samples/hello-world/src/SidePanel.html b/addons-web-sdk/samples/hello-world/src/SidePanel.html index 4725f3b..4ef850a 100644 --- a/addons-web-sdk/samples/hello-world/src/SidePanel.html +++ b/addons-web-sdk/samples/hello-world/src/SidePanel.html @@ -1,23 +1,21 @@ + + + Meet Add-on Side Panel + + - - - Meet Add-on Side Panel - - + +
This is the Add-on Side Panel. Only you can see this.
+ - -
This is the Add-on Side Panel. Only you can see this.
- - - - - - \ No newline at end of file + + + diff --git a/addons-web-sdk/samples/hello-world/src/index.js b/addons-web-sdk/samples/hello-world/src/main.js similarity index 95% rename from addons-web-sdk/samples/hello-world/src/index.js rename to addons-web-sdk/samples/hello-world/src/main.js index 0d04b44..a501d06 100644 --- a/addons-web-sdk/samples/hello-world/src/index.js +++ b/addons-web-sdk/samples/hello-world/src/main.js @@ -14,7 +14,6 @@ import { meet } from '@googleworkspace/meet-addons/meet.addons'; -// TODO: Make sure that you modify these constants, if you fork this! const CLOUD_PROJECT_NUMBER = '989911054302'; const MAIN_STAGE_URL = 'https://googleworkspace.github.io/meet/hello-world/MainStage.html'; diff --git a/addons-web-sdk/samples/hello-world/webpack.config.js b/addons-web-sdk/samples/hello-world/webpack.config.js index 0269da0..05e6e60 100644 --- a/addons-web-sdk/samples/hello-world/webpack.config.js +++ b/addons-web-sdk/samples/hello-world/webpack.config.js @@ -15,10 +15,9 @@ const path = require('path'); module.exports = { - entry: './src/index.js', + entry: './src/main.js', output: { - filename: 'main.js', - library: "helloWorld", + library: 'helloWorld', path: path.resolve(__dirname, '../dist/hello-world'), }, };