This content originally appeared on DEV Community and was authored by DEV Community
Hello there, I'm new to Next and I am trying to get this template to Nextjs. But I've been stuck trying to get the:
<script>
document.addEventListener("DOMContentLoaded", function (event) {
masonryBuild();
});
</script>
At this point I don't know what to do anymore.
This is what I have:
<Script
id="load-content"
dangerouslySetInnerHTML={{
__html: `document.addEventListener("DOMContentLoaded", function (event) {
masonryBuild();
});`,
}}
/>
<Script
id="load-content2"
dangerouslySetInnerHTML={{
__html: `document.addEventListener("DOMContentLoaded", function (event) {
navbarToggleSidebar();
navActivePage();
});`,
}}
/>
<Script src="/main.js" />
<Script src="/mine.js" />
It's supposed to work, but it's not!
This content originally appeared on DEV Community and was authored by DEV Community
DEV Community | Sciencx (2022-02-22T23:26:43+00:00) Converting a site to Nextjs. Retrieved from https://www.scien.cx/2022/02/22/converting-a-site-to-nextjs/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.