import type { Request, Response } from 'express'; import { escapeHtml } from '../util.js'; export function renderCollection(req: Request, res: Response, { collection, container, user }) { const nicestName = collection.label || container.name || ''; res.render('collection', { title: `Annotation collection “${nicestName}” of ${user}`, collection, nicestName, user, head: ` `, json: JSON.stringify(collection, null, 2), annotations: collection.first.items, }); }