chore(lp): 📦️ Import existing Landing page
This commit is contained in:
16
apps/landing-page/lib/landbot.ts
Normal file
16
apps/landing-page/lib/landbot.ts
Normal file
@ -0,0 +1,16 @@
|
||||
const loadLandbot = (): Promise<void> =>
|
||||
new Promise((resolve) => {
|
||||
const existingScript = document.getElementById('landbot-lib')
|
||||
if (!existingScript) {
|
||||
const script = document.createElement('script')
|
||||
script.src = 'https://static.landbot.io/landbot-3/landbot-3.0.0.js'
|
||||
script.id = 'landbot-lib'
|
||||
document.body.appendChild(script)
|
||||
script.onload = () => {
|
||||
resolve()
|
||||
}
|
||||
}
|
||||
if (existingScript) resolve()
|
||||
})
|
||||
|
||||
export default loadLandbot
|
Reference in New Issue
Block a user