| 1 | export async function render(url) { |
| 2 | switch (url) { |
| 3 | case '/': |
| 4 | return `<ul>${[ |
| 5 | '/static-light', |
| 6 | '/static-heavy', |
| 7 | '/direct-add', |
| 8 | '/direct-light', |
| 9 | ] |
| 10 | .map((name) => `<li><a href="${name}">${name}</a></li>`) |
| 11 | .join('')}</ul>` |
| 12 | case '/static-light': |
| 13 | return (await import('./static-light')).render() |
| 14 | case '/static-heavy': |
| 15 | return (await import('./static-heavy')).render() |
| 16 | case '/direct-add': |
| 17 | return (await import('./direct-add')).render() |
| 18 | case '/direct-light': |
| 19 | return (await import('./direct-light')).render() |
| 20 | } |
| 21 | } |