Commit ee1e38f3 authored by Sebastian Trebunak's avatar Sebastian Trebunak
Browse files

logs removed

parent cb7660cc
......@@ -24,22 +24,19 @@ export default class App extends React.Component {
}
getNotifications = () => {
console.log("Get Notifications now!!");
// const notifications treba nahradit za fetch a setState spustit iba v pripade ze sa data zmenia
// pretoze by default to re-renderuje celu aplikaciu
if (this.state.notifications.length === 0) {
return this.setState({ notifications: NOTIFICATIONS });
}
// toto je len generator statickych novych notifikacii,, mozes zmazat ked bude fetch
let nextItem = NOTIFICATIONS[this.state.notifications.length - 4];
if (!nextItem) {
nextItem = NOTIFICATIONS[0];
}
const notifications = [...this.state.notifications, nextItem];
console.log(notifications);
console.log("===================");
this.setState({ notifications });
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment