fix: resolve hydration mismatch and NaN rendering errors
Some checks failed
Dev Deployment (Zero Downtime) / deploy-dev (push) Failing after 9m53s

Added suppressHydrationWarning to html tag and implemented safe date/number handling in project and reading components.
This commit is contained in:
2026-02-15 22:48:47 +01:00
parent cc8fff14d2
commit 5576e41ce0
4 changed files with 15 additions and 5 deletions

View File

@@ -222,7 +222,12 @@ export default function ProjectsPageClient({
</h3>
<div className="flex items-center space-x-2 text-stone-400 text-xs font-mono bg-white/50 px-2 py-1 rounded border border-stone-100">
<Calendar size={12} />
<span>{new Date(project.date).getFullYear()}</span>
<span>
{(() => {
const d = new Date(project.date);
return isNaN(d.getTime()) ? project.date : d.getFullYear();
})()}
</span>
</div>
</div>