Skip to content

Commit

Permalink
Disable link prefetch
Browse files Browse the repository at this point in the history
Closes #258
  • Loading branch information
stscoundrel committed May 19, 2024
1 parent 26703ff commit 09fef1f
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/components/Breadcrumbs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default function Breadcrumbs({ type, content }: BreadcrumbProps) {
<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.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default function Navigation({ letters, noSearch = false }: NavigationProp
<div className={styles.topBarSpacer}></div>
<nav className={styles.section}>
<div className={`${styles.topbar} container`}>
<Link href="/" passHref>
<Link href="/" passHref prefetch={false}>
<Image src="/favicon-48x48.png" width="30" height="30" alt="To home" />
</Link>
<Hamburger action={openNav} />
Expand Down
8 changes: 4 additions & 4 deletions src/components/SampleText/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ export default function SampleText() {
</p>
<p>
<em>
Magnus <Link href="/word/med">með</Link> <Link href="/word/gud">guðs</Link> <Link href="/word/miskunn">miskun</Link> <Link href="/word/noregr">noregs</Link> <Link href="/word/konungr">konungr</Link> <Link href="/word/son">son</Link> Hakonar <Link href="/word/konungr">konungs</Link> <Link href="/word/sonarsonr">sonar son</Link> Suerris <Link href="/word/konungr">konungs</Link> <Link href="/word/senda">sender</Link> ollum gudes vínum ok sínum j frosto <Link href="/word/thing">þings</Link> <Link href="/word/log">logum</Link>.
<Link href="/word/kvedja">Qveðju</Link> <Link href="/word/gud">Guðs</Link> <Link href="/word/ok">ok</Link> <Link href="/word/sina">sina</Link> Þer <Link href="/word/vita">vitið</Link> at hínír skynsamozsto menn af frosto <Link href="/word/thing">þings</Link> <Link href="/word/log">logum</Link> <Link href="/word/hafa">hafa</Link> iðurlega
getet <Link href="/word/firir">firir</Link> <Link href="/word/oss-2">oss</Link> at þer hafet <Link href="/word/spyrja">spurt</Link> at ver
hofum lut i at t bøta nokot um flæstar <Link href="/word/logbok">logbøkr</Link>.
Magnus <Link href="/word/med" prefetch={false}>með</Link> <Link href="/word/gud" prefetch={false}>guðs</Link> <Link href="/word/miskunn" prefetch={false}>miskun</Link> <Link href="/word/noregr" prefetch={false}>noregs</Link> <Link href="/word/konungr" prefetch={false}>konungr</Link> <Link href="/word/son" prefetch={false}>son</Link> Hakonar <Link href="/word/konungr" prefetch={false}>konungs</Link> <Link href="/word/sonarsonr" prefetch={false}>sonar son</Link> Suerris <Link href="/word/konungr" prefetch={false}>konungs</Link> <Link href="/word/senda" prefetch={false}>sender</Link> ollum gudes vínum ok sínum j frosto <Link href="/word/thing" prefetch={false}>þings</Link> <Link href="/word/log" prefetch={false}>logum</Link>.
<Link href="/word/kvedja" prefetch={false}>Qveðju</Link> <Link href="/word/gud" prefetch={false}>Guðs</Link> <Link href="/word/ok" prefetch={false}>ok</Link> <Link href="/word/sina" prefetch={false}>sina</Link> Þer <Link href="/word/vita" prefetch={false}>vitið</Link> at hínír skynsamozsto menn af frosto <Link href="/word/thing" prefetch={false}>þings</Link> <Link href="/word/log" prefetch={false}>logum</Link> <Link href="/word/hafa" prefetch={false}>hafa</Link> iðurlega
getet <Link href="/word/firir" prefetch={false}>firir</Link> <Link href="/word/oss-2" prefetch={false}>oss</Link> at þer hafet <Link href="/word/spyrja" prefetch={false}>spurt</Link> at ver
hofum lut i at t bøta nokot um flæstar <Link href="/word/logbok" prefetch={false}>logbøkr</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.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface WordLinkPros{

export default function WordLink({ data: { slug, word } }: WordLinkPros) {
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 @@ -34,7 +34,7 @@ export default function Index({ letters }: IndexProps) {
<p>The dictionary contains over 40 000 translations
from Old Norwegian/Norse to Norwegian. This is the largest dictionary of the language.</p>

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

0 comments on commit 09fef1f

Please sign in to comment.