Skip to content

Commit

Permalink
Disable link prefetch
Browse files Browse the repository at this point in the history
Closes #379
  • Loading branch information
stscoundrel committed May 19, 2024
1 parent 74ffcdb commit 50db1ec
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/components/Breadcrumbs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default function Breadcrumbs({ type, content }) {
<nav className={styles.section}>
<div className="container">
{breadcrumbs.map(({ label, url }) => (
<Link key={url} href={url} className={styles.link}>
<Link key={url} href={url} className={styles.link} prefetch={false}>
{label}
</Link>
))}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Navigation/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function Navigation({ letters, noSearch = false }) {
<div className={styles.topBarSpacer}></div>
<nav className={styles.section}>
<div className={`${styles.topbar} container`}>
<Link href="/">
<Link href="/" prefetch={false}>
<Image src="/favicon-48x48.png" width="30" height="30" alt="To home" />
</Link>
<Hamburger action={openNav} />
Expand Down
12 changes: 6 additions & 6 deletions src/components/SampleText/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ export default function SampleText() {
</p>
<p>
<em>
<Link href="/word/ulfr">Úlfr</Link> <Link href="/word/heita">hét</Link> <Link href="/word/madr">maðr</Link>, <Link href="/word/sonr">sonr</Link> Bjálfa <Link href="/word/ok">ok</Link> Hallberu, <Link href="/word/dottir">dóttur</Link> <Link href="/word/ulfr">Úlfs</Link> <Link href="/word/inn">ins</Link> <Link href="/word/o-2">ó</Link><Link href="/word/argr">arga</Link>.&nbsp;
<Link href="/word/hon">Hon</Link> <Link href="/word/vera">var</Link> <Link href="/word/systir">systir</Link> Hallbjarnar <Link href="/word/halftroll">hálftrölls</Link> í Hrafnistu, <Link href="/word/fadir">föður</Link> <Link href="/word/ketill">Ketils</Link> hængs.&nbsp;
<Link href="/word/ulfr">Úlfr</Link> <Link href="/word/var">var</Link> <Link href="/word/madr">maðr</Link> <Link href="/word/sva">svá</Link> <Link href="/word/mikill">mikill</Link> <Link href="/word/ok">ok</Link> <Link href="/word/sterkr">sterkr</Link>, <Link href="/word/at">at</Link> <Link href="/word/eigi">eigi</Link> <Link href="/word/varu">váru</Link> <Link href="/word/hann">hans</Link> <Link href="/word/jafningi">jafningjar</Link>.&nbsp;
<Link href="/word/en">En</Link> <Link href="/word/er">er</Link> <Link href="/word/hann">hann</Link> <Link href="/word/vera">var</Link> á <Link href="/word/ungr">unga</Link> <Link href="/word/aldr">aldri</Link>, lá <Link href="/word/hann">hann</Link> <Link href="/word/i">í</Link> <Link href="/word/vikingr">víkingu</Link> <Link href="/word/ok">ok</Link> <Link href="/word/herja">herjaði</Link>.&nbsp;
<Link href="/word/med">Með</Link> <Link href="/word/hann">honum</Link> <Link href="/word/vera">var</Link> <Link href="/word/i">í</Link> <Link href="/word/felagskapr">félagsskap</Link> <Link href="/word/sa"></Link> <Link href="/word/madr">maðr</Link>, <Link href="/word/er">er</Link> <Link href="/word/kalla">kallaðr</Link> <Link href="/word/var">var</Link> Berðlu-Kári,&nbsp;
<Link href="/word/gofugr">göfugr maðr</Link> <Link href="/word/ok">ok</Link> <Link href="/word/inn">inn</Link> <Link href="/word/mest">mesti</Link> <Link href="/word/afreksmadr">afreksmaðr</Link> <Link href="/word/at">at</Link> <Link href="/word/afli">afli</Link> <Link href="/word/ok">ok</Link> <Link href="/word/araedi">áræði</Link>. <Link href="/word/hann">Hann</Link> <Link href="/word/var">var</Link> <Link href="/word/berserkr">berserkr</Link>.
<Link href="/word/ulfr" prefetch={false}>Úlfr</Link> <Link href="/word/heita" prefetch={false}>hét</Link> <Link href="/word/madr" prefetch={false}>maðr</Link>, <Link href="/word/sonr" prefetch={false}>sonr</Link> Bjálfa <Link href="/word/ok" prefetch={false}>ok</Link> Hallberu, <Link href="/word/dottir" prefetch={false}>dóttur</Link> <Link href="/word/ulfr" prefetch={false}>Úlfs</Link> <Link href="/word/inn" prefetch={false}>ins</Link> <Link href="/word/o-2" prefetch={false}>ó</Link><Link href="/word/argr" prefetch={false}>arga</Link>.&nbsp;
<Link href="/word/hon" prefetch={false}>Hon</Link> <Link href="/word/vera" prefetch={false}>var</Link> <Link href="/word/systir" prefetch={false}>systir</Link> Hallbjarnar <Link href="/word/halftroll" prefetch={false}>hálftrölls</Link> í Hrafnistu, <Link href="/word/fadir" prefetch={false}>föður</Link> <Link href="/word/ketill" prefetch={false}>Ketils</Link> hængs.&nbsp;
<Link href="/word/ulfr" prefetch={false}>Úlfr</Link> <Link href="/word/var" prefetch={false}>var</Link> <Link href="/word/madr" prefetch={false}>maðr</Link> <Link href="/word/sva" prefetch={false}>svá</Link> <Link href="/word/mikill" prefetch={false}>mikill</Link> <Link href="/word/ok" prefetch={false}>ok</Link> <Link href="/word/sterkr" prefetch={false}>sterkr</Link>, <Link href="/word/at" prefetch={false}>at</Link> <Link href="/word/eigi" prefetch={false}>eigi</Link> <Link href="/word/varu" prefetch={false}>váru</Link> <Link href="/word/hann" prefetch={false}>hans</Link> <Link href="/word/jafningi" prefetch={false}>jafningjar</Link>.&nbsp;
<Link href="/word/en" prefetch={false}>En</Link> <Link href="/word/er" prefetch={false}>er</Link> <Link href="/word/hann" prefetch={false}>hann</Link> <Link href="/word/vera" prefetch={false}>var</Link> á <Link href="/word/ungr" prefetch={false}>unga</Link> <Link href="/word/aldr" prefetch={false}>aldri</Link>, lá <Link href="/word/hann" prefetch={false}>hann</Link> <Link href="/word/i" prefetch={false}>í</Link> <Link href="/word/vikingr" prefetch={false}>víkingu</Link> <Link href="/word/ok" prefetch={false}>ok</Link> <Link href="/word/herja" prefetch={false}>herjaði</Link>.&nbsp;
<Link href="/word/med" prefetch={false}>Með</Link> <Link href="/word/hann" prefetch={false}>honum</Link> <Link href="/word/vera" prefetch={false}>var</Link> <Link href="/word/i" prefetch={false}>í</Link> <Link href="/word/felagskapr" prefetch={false}>félagsskap</Link> <Link href="/word/sa" prefetch={false}></Link> <Link href="/word/madr" prefetch={false}>maðr</Link>, <Link href="/word/er" prefetch={false}>er</Link> <Link href="/word/kalla" prefetch={false}>kallaðr</Link> <Link href="/word/var" prefetch={false}>var</Link> Berðlu-Kári,&nbsp;
<Link href="/word/gofugr" prefetch={false}>göfugr maðr</Link> <Link href="/word/ok" prefetch={false}>ok</Link> <Link href="/word/inn" prefetch={false}>inn</Link> <Link href="/word/mest" prefetch={false}>mesti</Link> <Link href="/word/afreksmadr" prefetch={false}>afreksmaðr</Link> <Link href="/word/at" prefetch={false}>at</Link> <Link href="/word/afli" prefetch={false}>afli</Link> <Link href="/word/ok" prefetch={false}>ok</Link> <Link href="/word/araedi" prefetch={false}>áræði</Link>. <Link href="/word/hann" prefetch={false}>Hann</Link> <Link href="/word/var" prefetch={false}>var</Link> <Link href="/word/berserkr" prefetch={false}>berserkr</Link>.
</em>
</p>

Expand Down
2 changes: 1 addition & 1 deletion src/components/SearchResults/SearchTeaser/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default function SearchTeaser({ data }: SearchTeaserProps) {

return (
<div className={styles.result}>
<Link key={`link${slug}`} href={`/word/${slug}`} className={styles.link}>
<Link key={`link${slug}`} href={`/word/${slug}`} className={styles.link} prefetch={false}>
{word.toLowerCase()}
</Link>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion src/components/WordLink/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default function WordLink({ data }) {
const { slug, word } = data

return (
<Link key={`link${slug}`} href={`/word/${slug}`} className={styles.link}>
<Link key={`link${slug}`} href={`/word/${slug}`} className={styles.link} prefetch={false}>
{word.toLowerCase()}
</Link>
)
Expand Down
2 changes: 1 addition & 1 deletion src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default function Index({ letters }: IndexProps) {
Cleasby - Vigfusson dictionary, specifically for beginners and those interested in
Old Icelandic prose writing.</p>

<Link href="/search" passHref className="button">
<Link href="/search" passHref className="button" prefetch={false}>
Search the dictionary
</Link>
</ContentArea>
Expand Down

0 comments on commit 50db1ec

Please sign in to comment.