(template: string, params: Record<string, string>)
| 195 | }) |
| 196 | |
| 197 | export function route(template: string, params: Record<string, string>) { |
| 198 | return Object.entries(params).reduce( |
| 199 | (next, [key, value]) => next.replaceAll(`{${key}}`, value).replaceAll(`:${key}`, value), |
| 200 | template, |
| 201 | ) |
| 202 | } |
| 203 | |
| 204 | export function controlledPtyInput(title: string | undefined) { |
| 205 | return { |