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 @@ + +
+