I would like to implement a script within my next.js app I'm currently using
import Script from "next/script";
and then within my
return (
<div>
<Script>const tooltips= {color: true, icon: true, size: true}</Script>
<Script src="url to script"></Script>
<main>
</main>
</div>
)
the script loads, but how can i set the tooltips const in nextjs? using
const something = ""
doesn't work. I tried using the script within a normal html file and it works. How would i implement this in nextjs? I'm probably already implementing it wrong because i cant use const after my return? What would be the right way to set these values?