Making Share Target functional

This commit is contained in:
Fabian
2019-06-03 16:51:11 +02:00
parent 7917a628ef
commit 31d9f99b77
13 changed files with 114 additions and 88 deletions

View File

@ -1,5 +1,4 @@
import { h, Component } from "preact";
import Notes from "../notes";
import "./notifications.scss"
import Notifications, { MessageType } from "../notifications";
@ -37,11 +36,11 @@ export default class NotificationsComponent extends Component<{}, {
this.setState({ notifications: n });
setTimeout(() => {
this.removeNot(not);
}, 3000);
}, 20000);
}
removeNot(not: { message: string }) {
let n = this.state.notifications.slice(0).filter(e => e !== not);
let n = this.state.notifications.filter(e => e !== not);
this.setState({ notifications: n });
}