Setup user features in TypeScript

This commit is contained in:
Andreas Nedbal 2021-12-25 03:33:09 +01:00
parent 3b5e963da5
commit cf8d6b0884
2 changed files with 11 additions and 1 deletions

View File

@ -1,7 +1,9 @@
import start from 'retrospring/common';
import initAnswerbox from 'retrospring/features/answerbox/index';
import initInbox from 'retrospring/features/inbox/index';
import initUser from 'retrospring/features/user';
start();
document.addEventListener('turbolinks:load', initAnswerbox);
document.addEventListener('turbolinks:load', initInbox);
document.addEventListener('turbolinks:load', initInbox);
document.addEventListener('DOMContentLoaded', initUser);

View File

@ -0,0 +1,8 @@
import { userActionHandler } from './action';
import { userReportHandler } from './report';
import { on } from 'utilities/on';
export default (): void => {
on('click', 'button[name=user-action]', userActionHandler);
on('click', 'a[data-action=report-user]', userReportHandler);
}