[Solved] Dynamically generated NavLinks have weird behavior on ISR
I've got a page on https://ambushfall-next13-app.vercel.app/ where I dynamically generate the navlinks under layouts with the following code
This works fine, however, the /projects path upon reload will cause the navlinks to disappear and only home+projects will be visible.
Does anyone have the faintest idea of what I'm doing wrong?
1 Reply
Note: This works fine in dev
Not in prod
Issue resolved
Moving the logic from layouts.tsx to a prebuild step that generates JSON, then importing that JSON sorted out the issue.
For anyone interested:
prebuild.js
then importing into layouts using:
Works without any quirky behavior, hope this helps someone someday