()
| 505 | ); |
| 506 | |
| 507 | const addFolder = (): void => { |
| 508 | // Store the canonical (normalized) form so "templates" and "templates/" |
| 509 | // can't both be added, and dedupe against the existing list. |
| 510 | const [folder] = normalizeTemplateFolderPaths([input.inputEl.value]); |
| 511 | input.inputEl.value = ""; |
| 512 | if (!folder) return; |
| 513 | const paths = getPaths(); |
| 514 | if (paths.includes(folder)) return; |
| 515 | setPaths([...paths, folder]); |
| 516 | renderList(); |
| 517 | }; |
| 518 | |
| 519 | const onKeydown = (e: KeyboardEvent): void => { |
| 520 | if (e.key === "Enter") { |
nothing calls this directly
no test coverage detected