hydration error
This commit is contained in:
@@ -26,9 +26,6 @@ export default function MarketingLayout({
|
||||
setScrolled(window.scrollY > 20);
|
||||
};
|
||||
|
||||
// Check immediately on mount
|
||||
handleScroll();
|
||||
|
||||
window.addEventListener('scroll', handleScroll, { passive: true });
|
||||
return () => window.removeEventListener('scroll', handleScroll);
|
||||
}, []);
|
||||
@@ -37,6 +34,7 @@ export default function MarketingLayout({
|
||||
useEffect(() => {
|
||||
setMobileMenuOpen(false);
|
||||
setToolsOpen(false);
|
||||
setMobileToolsOpen(false);
|
||||
}, [pathname]);
|
||||
|
||||
// Default to English for general marketing pages
|
||||
|
||||
@@ -81,7 +81,7 @@ export default function AuthorPage({ params }: { params: { slug: string } }) {
|
||||
<div className="space-y-4">
|
||||
{posts.map(p => (
|
||||
<Link key={p.slug} href={`/blog/${p.slug}`} className="block group p-6 rounded-xl border border-gray-200 bg-white hover:border-blue-200 hover:shadow-sm transition-all">
|
||||
<div className="text-sm text-gray-400 mb-1">{new Date(p.datePublished || p.date).toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric' })}</div>
|
||||
<div className="text-sm text-gray-400 mb-1">{p.date}</div>
|
||||
<h3 className="text-xl font-bold text-gray-900 group-hover:text-blue-700 transition-colors mb-2">{p.title}</h3>
|
||||
<p className="text-gray-600">{p.description}</p>
|
||||
</Link>
|
||||
|
||||
@@ -55,7 +55,7 @@ export default function PillarPage({ params }: { params: { pillar: PillarKey } }
|
||||
<div className="grid md:grid-cols-2 gap-6">
|
||||
{posts.map(p => (
|
||||
<Link key={p.slug} href={`/blog/${p.slug}`} className="group block rounded-xl border border-gray-200 bg-white p-6 shadow-sm hover:shadow-md hover:border-blue-200 transition-all">
|
||||
<div className="text-xs text-gray-400 mb-2">{new Date(p.datePublished || p.date).toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric' })}</div>
|
||||
<div className="text-xs text-gray-400 mb-2">{p.date}</div>
|
||||
<div className="text-lg font-bold text-gray-900 mb-2 group-hover:text-blue-700">{p.title}</div>
|
||||
<div className="text-sm text-gray-600 line-clamp-2">{p.description}</div>
|
||||
</Link>
|
||||
|
||||
@@ -45,7 +45,7 @@ export default function LearnHubPage() {
|
||||
<Link key={p.slug} href={`/blog/${p.slug}`} className="group block rounded-2xl border border-gray-200 bg-white p-6 shadow-sm hover:shadow-md hover:border-blue-200 transition-all">
|
||||
<div className="flex justify-between items-center mb-3">
|
||||
<div className="text-xs font-semibold px-2 py-1 rounded bg-gray-100 text-gray-600">{p.pillar?.toUpperCase() || 'GUIDE'}</div>
|
||||
<div className="text-xs text-gray-400">{new Date(p.datePublished || p.date).toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric' })}</div>
|
||||
<div className="text-xs text-gray-400">{p.date}</div>
|
||||
</div>
|
||||
<div className="text-xl font-bold text-gray-900 mb-2 group-hover:text-blue-700 line-clamp-2">{p.title}</div>
|
||||
<div className="text-gray-600 line-clamp-2">{p.description}</div>
|
||||
|
||||
Reference in New Issue
Block a user