-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(engine): ⚡️ Enforce lite badge even when removed
- Loading branch information
1 parent
d43623b
commit 3552279
Showing
2 changed files
with
48 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import React, { useEffect, useRef } from 'react' | ||
import { useFrame } from 'react-frame-component' | ||
|
||
export const LiteBadge = () => { | ||
const { document } = useFrame() | ||
const liteBadge = useRef<HTMLAnchorElement | null>(null) | ||
|
||
useEffect(() => { | ||
const container = document.querySelector( | ||
'[data-testid="container"]' | ||
) as HTMLDivElement | ||
const observer = new MutationObserver(function (mutations_list) { | ||
mutations_list.forEach(function (mutation) { | ||
mutation.removedNodes.forEach(function (removed_node) { | ||
if ((removed_node as HTMLElement).id == 'lite-badge') { | ||
console.log('litebadge has been removed') | ||
container.append(liteBadge.current as Node) | ||
} | ||
}) | ||
}) | ||
}) | ||
observer.observe(container, { | ||
subtree: false, | ||
childList: true, | ||
}) | ||
|
||
return () => { | ||
observer.disconnect() | ||
} | ||
// eslint-disable-next-line react-hooks/exhaustive-deps | ||
}, []) | ||
|
||
return ( | ||
<a | ||
ref={liteBadge} | ||
href={'https://www.typebot.io/?utm_source=litebadge'} | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
className="fixed py-1 px-2 bg-white z-50 rounded shadow-md lite-badge" | ||
style={{ bottom: '20px' }} | ||
id="lite-badge" | ||
> | ||
Made with <span className="text-blue-500">Typebot</span>. | ||
</a> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3552279
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
builder-v2 – ./apps/builder
builder-v2-typebot-io.vercel.app
builder-v2-git-main-typebot-io.vercel.app
app.typebot.io
3552279
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
landing-page-v2 – ./apps/landing-page
typebot.io
get-typebot.com
www.typebot.io
landing-page-v2-typebot-io.vercel.app
landing-page-v2-git-main-typebot-io.vercel.app
www.get-typebot.com
3552279
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
viewer-v2 – ./apps/viewer
bot.joof.it
danyservice.it
bot.tvbeat.it
yoda.riku.ai
gollum.riku.ai
chat.hayuri.id
app.yvon.earth
frankmeuche.de
bergamo.store
talk.gocare.io
bot.jesopizz.it
fitness.riku.ai
bot.rihabilita.it
chatbot.matthesv.de
viewer.typebot.io
bot.dsignagency.com
bot.contakit.com
88584434.therpm.club
zap.fundviser.in
demo.wemakebots.xyz
92109660.therpm.club
bot.barrettamario.it
hello.advergreen.com
criar.somaperuzzo.com
bot.ilmuseoaiborghi.it
bot.pratikmandalia.com
bot.digitalpointer.id
bot.robertohairlab.it
form.bridesquadapp.com
bot.outstandbrand.com
michaeljackson.riku.ai
arrivalx2.wpwakanda.com
forms.hiabhaykulkarni.com
bot.hotelplayarimini.it
link.venturasuceder.com
bot.amicidisanfaustino.it
chat.thehomebuyersusa.com
invite.bridesquadapp.com
87656003.actualizar.xyz
91375310.actualizar.xyz
typebot-viewer.vercel.app
bot.adventureconsulting.hu
casestudyemb.wpwakanda.com
bot.polychromes-project.com
homepageonly.wpwakanda.com
bot.seidinembroseanchetu.it
liveconvert.kandalearn.com
mainmenu1one.wpwakanda.com
tarian.theiofoundation.org
bot.pinpointinteractive.com
chat.atlasoutfittersk9.com
liveconvert2.kandalearn.com
bot.seidibergamoseanchetu.it
viewer-v2-typebot-io.vercel.app
bot.studiotecnicoimmobiliaremerelli.it
viewer-v2-git-main-typebot-io.vercel.app
forms.escoladeautomacao.com.br