import { PageProps } from '$fresh/server.ts' import { Markdown } from ':components/Markdown.tsx' import { MemberCard, memberMock } from ':components/MemberCard.tsx' const db = [ 'julien.oculi', ] async function getCarnet(user: string): Promise { try { const response = await fetch( `https://git.cohabit.fr/${user}/.carnet/raw/branch/main/index.md`, ) return response.text() } catch (error) { return 'Carnet introuvable\n```js\nString(error)\n```' } } export default async function Member(_: Request, { params }: PageProps) { const id = Number(params.id) const Member = memberMock.at(id) if (!Member) { return

Membre inconnu, peut ĂȘtre serez vous le prochain

} const carnet = await getCarnet(db.at(id)!) return (
{MemberCard(Member)}
Portfolio
{carnet}
) }