Fix cart-badge false pulse, blog hero-card misattribution, legal breadcrumb color
- Cart badge pulsed on every page load/reload, not just real cart changes — useCartCount's SSR snapshot is always 0, so hydration alone satisfied the "count increased" check. Skip the very first effect run. - WishlistButton: touch-device smaller/subtler sizing now applies regardless of revealOnHover (e.g. the homepage spotlight heart), not just the shop grid's hover-reveal mode. - /blog: the big featured-style hero card was applied to whatever post sorted first post-filter, even when that post isn't actually the `featured` one (a category filter can exclude the real featured post entirely). Now gated on the post's own `featured` flag. - Legal pages' "Startseite" breadcrumb link now matches the same text-brand/hover:underline treatment already used elsewhere on these pages (e.g. Impressum's Anbieter email link), instead of staying muted until hover. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018unaXmuzVA8ct1b6WoyP1U
This commit is contained in:
+10
-1
@@ -47,7 +47,16 @@ export default async function BlogOverviewPage({
|
||||
const allCategories = blogFilterEnabled ? distinctCategories(allPosts) : [];
|
||||
const posts =
|
||||
activeCategories.length === 0 ? allPosts : allPosts.filter((post) => post.categories.some((c) => activeCategories.includes(c)));
|
||||
const [featured, ...rest] = posts;
|
||||
// getBlogPosts sorts "-featured,-publishedAt", so index 0 IS the actual
|
||||
// featured post when the unfiltered list is shown — but a category
|
||||
// filter can (and often will) exclude it entirely, in which case index 0
|
||||
// is just the newest matching post, not an editorially featured one. It
|
||||
// still doesn't deserve the big hero-card treatment (implies "the
|
||||
// featured post", not "whatever sorted first"), so that layout is gated
|
||||
// on the post's own `featured` flag, not on array position.
|
||||
const [first, ...restAll] = posts;
|
||||
const featured = first?.featured ? first : undefined;
|
||||
const rest = featured ? restAll : posts;
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user