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

17 lines
826 B
TypeScript
Raw Normal View History

import registerEvents from 'utilities/registerEvents';
import registerInboxEntryEvents from './entry';
import { authorSearchHandler } from './author';
import { deleteAllAuthorQuestionsHandler, deleteAllQuestionsHandler } from './delete';
import { generateQuestionHandler } from './generate';
2021-08-11 05:10:24 -07:00
export default (): void => {
registerEvents([
{ type: 'click', target: document.querySelector('#ib-generate-question'), handler: generateQuestionHandler },
{ type: 'click', target: document.querySelector('#ib-delete-all'), handler: deleteAllQuestionsHandler },
{ type: 'click', target: document.querySelector('#ib-delete-all-author'), handler: deleteAllAuthorQuestionsHandler },
{ type: 'submit', target: document.querySelector('#author-form'), handler: authorSearchHandler }
]);
2021-08-11 05:10:24 -07:00
registerInboxEntryEvents();
2021-08-11 05:10:24 -07:00
}