Skip to content
Snippets Groups Projects
Commit a170a8c1 authored by Andy Leuchtturm's avatar Andy Leuchtturm
Browse files

implement lifecyclephase with <img>

parent d780a901
No related branches found
No related tags found
1 merge request!86planning#1203: Standards
Pipeline #56144 waiting for manual action
import { Tag } from 'types/content/'
/* import useImgPath from 'shared/use-img-path'
import Image from 'next/image'
import useImgPath from 'shared/use-img-path'
const { getImgPath } = useImgPath()
const imageLoader = ({ src, width, quality }) => {
return `${src}?w=${width}&q=${quality || 75}`
} */
export default function LifecyclePicture(lifecyclephase:Tag) {
/* beim tag 'status' soll das zugehörige Lebenszyklus-Bild ausgegeben werden */
const imagePath = `/img/standards/lifecycle/${lifecyclephase.value}.svg`
return (
<div className="border border-gray-300 rounded-lg overflow-hidden py-2">
{/* Die Next.js Image-Komponente verwendet das "src" Attribut
<Image
loader={imageLoader}
{/* Die Next.js Image-Komponente verwendet das "src" Attribut */}
<img
src={getImgPath(imagePath)}
alt={`Bild für Tag ${lifecyclephase.value}`}
width={500} // Breite des Bildes
height={0} // Höhe des Bildes
/> */}
<p>{imagePath}</p>
/>
</div>
)
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment