* Use the public formkit url shortener. * @param url - A url to shorten
(url: string)
| 283 | * @param url - A url to shorten |
| 284 | */ |
| 285 | async function shorten(url: string): Promise<string> { |
| 286 | const res = await fetch('https://www.formk.it', { |
| 287 | method: 'POST', |
| 288 | headers: { 'Content-Type': 'application/json' }, |
| 289 | body: JSON.stringify({ url }), |
| 290 | }) |
| 291 | const data = await res.json() |
| 292 | return data.url |
| 293 | } |
| 294 | |
| 295 | async function editMode( |
| 296 | theme: string, |