import { PageProps } from '$fresh/server.ts' import { MemberCard, memberMock } from '../../../components/MemberCard.tsx' import { CSS, render as renderMd } from 'gfm' function Markdown({ children }: { children: string }) { return ( <>
) } 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 serai vous le prochain

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