touchscreen: whoops, fix up script tag (#3786)

followup to https://github.com/tldraw/tldraw/pull/3765

### Change Type

<!--  Please select a 'Scope' label ️ -->

- [x] `sdk` — Changes the tldraw SDK
- [ ] `dotcom` — Changes the tldraw.com web app
- [ ] `docs` — Changes to the documentation, examples, or templates.
- [ ] `vs code` — Changes to the vscode plugin
- [ ] `internal` — Does not affect user-facing stuff

<!--  Please select a 'Type' label ️ -->

- [x] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [ ] `improvement` — Improving existing features
- [ ] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [ ] `tests` — Changes to any test code
- [ ] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know
This commit is contained in:
Mime Čuvalo 2024-05-21 07:43:56 +01:00 committed by GitHub
parent 29608838ef
commit 3853c5f4d3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,9 +1,15 @@
import { useEffect } from 'react'
import { Helmet } from 'react-helmet-async'
import '../../styles/globals.css'
export function Component() {
useEffect(() => {
async function createSession() {
if ('meet' in window === false) {
setTimeout(createSession, 100)
return
}
const session = await (window as any).meet.addon.createAddonSession({
cloudProjectNumber: `${process.env.GOOGLE_CLOUD_PROJECT_NUMBER}`,
})
@ -20,8 +26,10 @@ export function Component() {
return (
<>
{/* eslint-disable @next/next/no-sync-scripts */}
<script src="https://www.gstatic.com/meetjs/addons/0.1.0/meet.addons.js"></script>
<Helmet>
{/* eslint-disable @next/next/no-sync-scripts */}
<script src="https://www.gstatic.com/meetjs/addons/0.1.0/meet.addons.js"></script>
</Helmet>
Starting a new session
</>
)