Install the scheduler on a page built on NextJS

If your page uses NextJS, the following snippet needs to be added

import Script from 'next/script'
	export const RHScheduler = ({ routerId, formId }): JSX.Element => {
		useEffect(() => {
			<Script
			  src="https://app.revenuehero.io/scheduler.min.js"
			  strategy="afterInteractive"
			  onLoad={() => {
			    const hero = new window.RevenueHero({ routerId: routerId })
			    hero.schedule(formId)
			  }}
			/>
		}, [])
	}

You’re all set!