Commit a0fff6cf authored by Stefan Probst's avatar Stefan Probst

fix: don't link step to step

parent 86ed3b96
Pipeline #168269 passed with stages
in 7 minutes and 55 seconds
......@@ -151,13 +151,23 @@ function Step({ step, index }: { step: Step; index: number }) {
<div className="leading-8">
<Markdown text={step.description} />
</div>
{step.relatedItems != null && step.relatedItems.length !== 0 ? (
<VStack>
<h4 className="font-medium">Resources</h4>
<RelatedItems items={step.relatedItems} />
</VStack>
) : null}
<Related items={step.relatedItems} />
</DisclosurePanel>
</Disclosure>
)
}
function Related({ items }: { items?: Array<any> }) {
if (items == null) return null
// TODO: relations to steps
const relatedItems = items.filter((item) => item.category !== 'step')
if (relatedItems.length === 0) return null
return (
<VStack>
<h4 className="sr-only">Resources</h4>
<RelatedItems items={relatedItems} />
</VStack>
)
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment