diff --git a/components/it-standards/PageHeaderCard.tsx b/components/it-standards/PageHeaderCard.tsx index 5e131b5845d98a3f41f5caf653807043a1947408..d8f42887b3b5494cdc327bc6b8498cf66312bc50 100644 --- a/components/it-standards/PageHeaderCard.tsx +++ b/components/it-standards/PageHeaderCard.tsx @@ -9,7 +9,7 @@ type HeaderOptions = { src: string alt?: string } - status?: string + status: string children?: ReactElement[] } diff --git a/pages/standards/index.tsx b/pages/standards/index.tsx index 44fbc8e1a0d5ce0bba1b2c8c4e5388b1e66f072d..8e86de465e830e1751c41a77389e411d783d83dd 100644 --- a/pages/standards/index.tsx +++ b/pages/standards/index.tsx @@ -12,7 +12,6 @@ import { handleMailtoEvent, encodeEmail } from '@/lib/utils' import { remark } from 'remark' import html from 'remark-html' import Tooltip from '@/components/Tooltip' -import ServiceTag from '@/components/it-standards/ServiceTag' import Chip from '@/components/Chip' import Link from 'next/link' @@ -22,6 +21,7 @@ import { ServiceContent } from 'types/ServiceContent' import { Tag } from 'types/content/' import useContent from 'shared/use-content' import useImgPath from 'shared/use-img-path' +import LifecyclePicture from '@/components/it-standards/LifecyclePicture' export default function ({ contentsString }) { const contents: ServiceContent[] = JSON.parse(contentsString) const router = useRouter() @@ -101,6 +101,7 @@ export default function ({ contentsString }) { <div className="mt-4"> <ul role="list" className="space-y-4"> {filteredServices.map((service: ServiceContent, key) => ( + // *** A list entry <li key={service.name} @@ -146,7 +147,10 @@ export default function ({ contentsString }) { {/* TAGs */} <div className="container flex flex-col md:flex-row my-2"> {service.tags.map((tag: Tag, key: number) => { - return <ServiceTag key={key} tag={tag} style={'bg-gray-400'} /> + // return <ServiceTag key={key} tag={tag} style={'bg-gray-400'} /> + if (tag.name == 'status') { + return <LifecyclePicture status = {tag.value} /> + } })} </div> {/* Kurzbeschreibung */} diff --git a/views/it-standards/Service.tsx b/views/it-standards/Service.tsx index 59a745a9ef9224242bda6d61d894d7969ac98234..349ae8f51a4fd9bf3649d8726f2e8c68b5e08086 100644 --- a/views/it-standards/Service.tsx +++ b/views/it-standards/Service.tsx @@ -1,6 +1,6 @@ import React from 'react' import Link from 'next/link' -import PageHeaderCard from '@/../pages/standards/components/PageHeaderCard' +import PageHeaderCard from '@/components/it-standards/PageHeaderCard' // import { decodeEmail } from '@/lib/utils' import { Tag } from 'types/content'