[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

  const reg = /^([^.]+)$/g;
  const appDirectory = path.join(process.cwd(), '/app');
  const appFilenames = await fs.readdir(appDirectory)
  const filterDirectories = appFilenames.filter((e) => e.match(reg) ? e !== 'components' && e !== 'api' && e !== 'github' : false)


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?
Was this page helpful?