diff --git a/app/notes/[slug]/counter.tsx b/app/notes/[slug]/counter.tsx index becf840f..bda16661 100644 --- a/app/notes/[slug]/counter.tsx +++ b/app/notes/[slug]/counter.tsx @@ -4,6 +4,7 @@ import CountUp from "../../../components/CountUp"; import redis from "../../../lib/redis"; const HitCounter = async ({ slug }: { slug: string }) => { + // ensure this component isn't triggered by prerenders and/or preloads await connection(); try { diff --git a/app/notes/[slug]/page.tsx b/app/notes/[slug]/page.tsx index 8288d20d..6a61fd40 100644 --- a/app/notes/[slug]/page.tsx +++ b/app/notes/[slug]/page.tsx @@ -125,7 +125,7 @@ const Page = async ({ params }: { params: Promise<{ slug: string }> }) => { className={styles.metaItem} style={{ // fix potential layout shift when number of hits loads - minWidth: "7em", + minWidth: "6em", marginRight: 0, }} > diff --git a/app/notes/page.tsx b/app/notes/page.tsx index c0ccac52..20a7796a 100644 --- a/app/notes/page.tsx +++ b/app/notes/page.tsx @@ -40,7 +40,11 @@ const Page = async () => {
  • ))} diff --git a/components/Header/Header.tsx b/components/Header/Header.tsx index 734a9f8d..950c457d 100644 --- a/components/Header/Header.tsx +++ b/components/Header/Header.tsx @@ -15,7 +15,7 @@ const Header = ({ className, ...rest }: HeaderProps) => { return (