Skip to content
Snippets Groups Projects
Commit fcf73d8d authored by Jürgen Voskuhl's avatar Jürgen Voskuhl
Browse files

Infobox 'combined standards'

parent 91ae3de5
No related branches found
No related tags found
Loading
Pipeline #56189 failed
import useImgPath from 'shared/use-img-path' import useImgPath from 'shared/use-img-path'
import MY_CONSTANTS from '@/lib/constants-standards.js'
const { getImgPath } = useImgPath() const { getImgPath } = useImgPath()
...@@ -8,17 +9,26 @@ type LifecylceOptions = { ...@@ -8,17 +9,26 @@ type LifecylceOptions = {
// Display the image corresponding to the lifecycle phase // Display the image corresponding to the lifecycle phase
export default ({ status } : LifecylceOptions) => { export default ({ status } : LifecylceOptions) => {
const imagePath = `/img/standards/lifecycle/${status}.svg` const imagePath = `/img/standards/lifecycle/${status}.svg`
console.log(status)
return ( if (MY_CONSTANTS.LYFE_CYCLE_PHASES.includes(status)) {
<div className="border border-gray-300 rounded-lg overflow-hidden py-2"> return (
{/* Die Next.js Image-Komponente verwendet das "src" Attribut */} <div className="border border-gray-300 rounded-lg overflow-hidden py-2">
<img {/* Die Next.js Image-Komponente verwendet das "src" Attribut */}
src={getImgPath(imagePath)} <img
alt={`Bild für Tag ${status}`} src={getImgPath(imagePath)}
width={500} // Breite des Bildes alt={`${status}`}
height={0} // Höhe des Bildes width={500} // Breite des Bildes
/> height={0} // Höhe des Bildes
</div> />
) </div>
)
}
else {
return (
<div className="border border-gray-300 rounded-lg overflow-hidden p-2">
#INVALID! (tags.status)
</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