Skip to content

Commit 3e30c60

Browse files
committed
Preload error page background image
1 parent 5350572 commit 3e30c60

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

‎app/error.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export default function ErrorPage({ error }: { error: Error & { digest?: string
1212

1313
return (
1414
<>
15+
<link rel="preload" as="image" href="/images/not-found/forest.webp" />
1516
<title>500 - Internal Server Error | Nathan Thomas</title>
1617
<OrbStage title="500 - Internal Server Error" />
1718
</>

‎app/global-error.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export default function GlobalError({ error }: { error: Error & { digest?: strin
1818
return (
1919
<html lang="en" suppressHydrationWarning>
2020
<head>
21+
<link rel="preload" as="image" href="/images/not-found/forest.webp" />
2122
<title>500 - Internal Server Error | Nathan Thomas</title>
2223
<script dangerouslySetInnerHTML={{ __html: THEME_SCRIPT }} />
2324
</head>

‎app/not-found.tsx‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,10 @@ export const metadata: Metadata = {
1717
};
1818

1919
export default function NotFound() {
20-
return <OrbStage title="404 - Not Found" />;
20+
return (
21+
<>
22+
<link rel="preload" as="image" href="/images/not-found/forest.webp" />
23+
<OrbStage title="404 - Not Found" />
24+
</>
25+
);
2126
}

0 commit comments

Comments
 (0)