Skip to content

Commit

Permalink
y
Browse files Browse the repository at this point in the history
  • Loading branch information
NickTnc24 committed Nov 30, 2024
1 parent 3d6bce5 commit 30b21b0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/app/customerView/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
'use client';
import {useEffect, useState } from 'react';
import Link from "next/link";
import Image, { ImageLoader, ImageLoaderProps } from 'next/image';
import Image from 'next/image';
import { useShoppingDataContext } from '@components/shoppingData';


Expand All @@ -11,9 +11,9 @@ interface Size {
size_name: string;
price: number;
}
const contentfulImageLoader: ImageLoader = ({ src, width }: ImageLoaderProps) => {
return `${src}?w=${width}`
}
// const contentfulImageLoader: ImageLoader = ({ src, width }: ImageLoaderProps) => {
// return `${src}?w=${width}`
// }

export default function CustomerView() {
const [sizes, setSizes] = useState<Size[]>([]);
Expand Down Expand Up @@ -59,7 +59,7 @@ return (
changeShoppingData({...shoppingData, numEntrees: 3, currentPrice: size.price});
}
}} href = "/sides">
<Image loader = {contentfulImageLoader} src ={"/" + size.size_name + ".png"} width = {200} height = {200} alt = "sizes" className='w-full'/>
<Image src ={"/" + size.size_name + ".png"} width = {200} height = {200} alt = "sizes" className='w-full'/>
<div className='text-2xl font-bold'>{size.size_name[0].toUpperCase() + size.size_name.substring(1).replaceAll("_", " ")}</div>
<div className='mt-4'>{size.size_id === 0 ? `1 Side & 1 Entree`: size.size_id == 1 ? "1 Side & 2 Entrees" : size.size_id === 2 ? "1 Side & 3 Entrees" : ""}</div>
<div>${String(size.price)}+</div>
Expand Down

0 comments on commit 30b21b0

Please sign in to comment.