this.state.postRes.comments.unshift(data.comment_view);
this.state.postRes.post_view.counts.comments++;
this.setState(this.state);
+ setupTippy();
}
} else if (
op == UserOperation.EditComment ||
} from './interfaces';
import { UserService, WebSocketService } from './services';
-var Tribute;
+var Tribute: any;
if (isBrowser()) {
Tribute = require('tributejs');
}
body: info.body,
});
- notification.onclick = () => {
- event.preventDefault();
+ notification.onclick = (ev: Event): any => {
+ ev.preventDefault();
router.history.push(info.link);
};
}
});
}
-var tippyInstance;
+var tippyInstance: any;
if (isBrowser()) {
tippyInstance = tippy('[data-tippy-content]');
}
export function setupTippy() {
if (isBrowser()) {
- tippyInstance.forEach(e => e.destroy());
+ tippyInstance.forEach((e: any) => e.destroy());
tippyInstance = tippy('[data-tippy-content]', {
delay: [500, 0],
// Display on "long press"