Retrospring/app/javascript/retrospring/features/inbox/author.ts

6 lines
228 B
TypeScript

export function authorSearchHandler(event: Event): void {
event.preventDefault();
const author = document.querySelector<HTMLInputElement>('#author')?.value;
window.location.href = `/inbox/${encodeURIComponent(author)}`;
}