mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-09-18 14:25:32 -04:00
experimental prefetching on hover for common links
This commit is contained in:
@@ -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 {
|
||||
|
@@ -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,
|
||||
}}
|
||||
>
|
||||
|
@@ -40,7 +40,11 @@ const Page = async () => {
|
||||
<li className={styles.post} key={slug}>
|
||||
<Time date={date} format="MMM d" className={styles.date} />
|
||||
<span>
|
||||
<Link href={`/${POSTS_DIR}/${slug}`} dangerouslySetInnerHTML={{ __html: htmlTitle || title }} />
|
||||
<Link
|
||||
dynamicOnHover
|
||||
href={`/${POSTS_DIR}/${slug}`}
|
||||
dangerouslySetInnerHTML={{ __html: htmlTitle || title }}
|
||||
/>
|
||||
</span>
|
||||
</li>
|
||||
))}
|
||||
|
Reference in New Issue
Block a user