Setup user features in TypeScript
This commit is contained in:
parent
3b5e963da5
commit
cf8d6b0884
|
@ -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);
|
|
@ -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);
|
||||
}
|
Loading…
Reference in New Issue