Shows the "Made with Lynkow" badge, accessible via lynkow.branding.
In a browser, the client mounts the badge at startup when the site config's
showBranding is true. Every method is a no-op on the server. The badge
follows the page's light or dark theme, and a failed badge request is
ignored.
Access via: lynkow.branding
Methods
4 methods
destroy
destroy(): voidAlias for remove, named like the destroy() of the other
browser services.
Returns: void
useEffect(() => {
return () => lynkow.branding.destroy()
}, [])inject
inject(): Promise<void>Fetches the badge markup and appends it to document.body, whatever the
showBranding setting. Does nothing
when a badge is already mounted, and overlapping calls mount one badge. A
remove() made while the request is in flight cancels the mount. Never
rejects: a failed request leaves the page unchanged.
Returns: Promise<void>
await lynkow.branding.inject()isVisible
isVisible(): booleanReturns true when the badge is mounted in the page. Always false on
the server.
Returns: boolean
if (!lynkow.branding.isVisible()) {
// Render our own attribution
}remove
remove(): voidRemoves the badge and its styles from the page, and cancels an inject()
still waiting for its request. Safe to call when no badge is mounted.
Returns: void
lynkow.branding.remove()