feat: show list name on header

This commit is contained in:
Jose Selesan
2026-10-19 12:46:40 -03:00
parent c374db1616
commit bba10361f0
6 changed files with 79 additions and 52 deletions

View File

@@ -35,6 +35,11 @@ const NEW_ITEM_INPUT_ID = 'new-item-input'
*/
export function focusNewItemInput(pathname: string): void {
if (pathname !== '/') return
refocusNewItemInput()
}
/** Puts the cursor back in the "add an item" input of the page on screen, if it has one. */
export function refocusNewItemInput(): void {
document.getElementById(NEW_ITEM_INPUT_ID)?.focus()
}