Skip to content

Commit

Permalink
Add basePath prefix to all Image components
Browse files Browse the repository at this point in the history
  • Loading branch information
samglover committed Sep 10, 2024
1 parent 6137b61 commit be0c4be
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/app/components/AffiliatesSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Link from 'next/link';
import Image from 'next/image';
import { Interface } from 'readline';
import styles from '../css/AffiliatesSection.module.css';
import nextConfig from '../../../next.config';

interface Affiliate {
name: string;
Expand Down Expand Up @@ -37,7 +38,7 @@ export default function AffiliatesBlock() {
return (
<Link href={affiliate.url} className="d-block" key={affiliate.name}>
<Image
src={'affiliates/' + affiliate.filename}
src={nextConfig.basePath + '/affiliates/' + affiliate.filename}
alt={affiliate.name}
className={styles.AffiliateLogo}
height={affiliate.height}
Expand Down
3 changes: 2 additions & 1 deletion src/app/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Link from 'next/link';
import Image from 'next/image';
import { prefix } from '../../../prefix';
import styles from '../css/Footer.module.css';
import nextConfig from '../../../next.config';

export default function Footer() {
return (
Expand All @@ -15,7 +16,7 @@ export default function Footer() {
<div className="col">
<a href="https://suffolklitlab.org" className={styles.SuffolkLogo}>
<Image
src="/lit-lab-logo-large.svg"
src={nextConfig.basePath + '/lit-lab-logo-large.svg'}
alt="Suffolk University Law School Legal Information & Technology Lab logo"
className="img-fluid mb-3"
width={792}
Expand Down
3 changes: 2 additions & 1 deletion src/app/components/NavigationBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { faArrowUpRightFromSquare } from '@fortawesome/free-solid-svg-icons';
import { faLanguage } from '@fortawesome/free-solid-svg-icons';
import { prefix } from '../../../prefix';
import styles from '../css/NavigationBar.module.css';
import nextConfig from '../../../next.config';

export default function NavigationBar() {
return (
Expand All @@ -15,7 +16,7 @@ export default function NavigationBar() {
<div className="container">
<Link href="/" className="navbar-brand d-flex align-items-center">
<Image
src="/courtformsonline.org/lit-lab-torch-inverted.svg"
src={nextConfig.basePath + '/lit-lab-torch-inverted.svg'}
alt="LIT Lab logo"
className={styles.NavLogo + ' logo-image me-2'}
height={263.32}
Expand Down
3 changes: 2 additions & 1 deletion src/app/components/ThankYou.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Link from 'next/link';
import Image from 'next/image';
import { Interface } from 'readline';
import styles from '../css/ThankYou.module.css';
import nextConfig from '../../../next.config';

interface Organization {
name: string;
Expand Down Expand Up @@ -124,7 +125,7 @@ export default function ThankYou() {
<div className="col" key={org.name}>
<Link href={org.url} className="d-block">
<Image
src={'partners/' + org.icon}
src={nextConfig.basePath + '/partners/' + org.icon}
alt={org.name}
height={org.height}
width={org.width}
Expand Down

0 comments on commit be0c4be

Please sign in to comment.