import { component$ } from '@builder.io/qwik'; import { useLocation } from '@builder.io/qwik-city'; import marked from 'marked'; import { data } from '../../../mock-data'; import type { Section, Priority } from '../../../types/PSC'; export default component$(() => { const loc = useLocation(); // const endpoint = useEndpoint<{ params: { title: string } }>(); const slug = loc.params.title; const section: Section | undefined = data.find((item: Section) => item.slug === slug); // You can now use `title` to fetch data related to this checklist item // and render it below. const getBadgeClass = (priority: Priority, precedeClass: string = '') => { switch (priority) { case 'recommended': return `${precedeClass}success`; case 'optional': return `${precedeClass}warning`; case 'advanced': return `${precedeClass}error`; default: return `${precedeClass}neutral`; } }; const generateId = (title: string) => { return title.toLowerCase().replace(/ /g, '-'); }; return (

{section?.title}

{section?.checklist.map((item, index) => ( ))}
Done? Advice Level Details
{item.priority}
); });