Skip to content

Commit ca393f9

Browse files
fix image paths
1 parent a53217b commit ca393f9

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/pages/_document.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import { Html, Head, Main, NextScript } from 'next/document'
2+
import { getAssetPath } from '../utils/assetHelpers'
23

34
export default function Document() {
45
return (
56
<Html lang="en">
67
<Head>
7-
<link rel="icon" href="/favicon.png" />
8+
<link rel="icon" href={getAssetPath("/favicon.png")} />
89
<link rel="preconnect" href="https://fonts.googleapis.com" />
910
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="true" />
1011
<link

src/pages/index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import Link from "next/link";
33
import { getDB } from "../lib/db";
44
import { initializeTestData } from "../lib/testData";
55
import { initializeTimeSimulation } from "../lib/timeSimulation";
6+
import { getAssetPath } from "../utils/assetHelpers";
67
import styles from "./Home.module.css";
78

89
export default function Home() {
@@ -106,7 +107,7 @@ export default function Home() {
106107
className={`${styles.classCard} ${styles.yoga}`}
107108
>
108109
<img
109-
src="/yoga-ginny-rose-stewart-UxkcSzRWM2s-unsplash-min.jpg"
110+
src={getAssetPath("/yoga-ginny-rose-stewart-UxkcSzRWM2s-unsplash-min.jpg")}
110111
alt="Yoga"
111112
className={styles.classImage}
112113
/>
@@ -124,7 +125,7 @@ export default function Home() {
124125
className={`${styles.classCard} ${styles.spin}`}
125126
>
126127
<img
127-
src="/spin-trust-tru-katsande-A_ftsTh53lM-unsplash-min.jpg"
128+
src={getAssetPath("/spin-trust-tru-katsande-A_ftsTh53lM-unsplash-min.jpg")}
128129
alt="Spin"
129130
className={styles.classImage}
130131
/>
@@ -141,7 +142,7 @@ export default function Home() {
141142
className={`${styles.classCard} ${styles.hiit}`}
142143
>
143144
<img
144-
src="/HIIT-karsten-winegeart-0Wra5YYVQJE-unsplash-min.jpg"
145+
src={getAssetPath("/HIIT-karsten-winegeart-0Wra5YYVQJE-unsplash-min.jpg")}
145146
alt="HIIT"
146147
className={styles.classImage}
147148
/>

0 commit comments

Comments
 (0)