Don't show ads on first install, rm console

This commit is contained in:
Ilya Ig. Petrov 2017-06-01 20:03:26 +05:00
parent dfc2243a65
commit 7bcd56f00c

View File

@ -46,7 +46,7 @@ export default function getApp(theState) {
setNewsStatusTo(newsArr) {
this.setStatusTo(
<ol>
<ol style="list-style-type: initial;">
{newsArr.map(([title, url]) => (<li><a href={url}>{title}</a></li>))}
</ol>
);
@ -95,7 +95,6 @@ export default function getApp(theState) {
}
);
console.log('RESP', comments, etag);
if (etag) {
localStorage[uiComEtag] = etag;
}
@ -114,7 +113,6 @@ export default function getApp(theState) {
let minDate;
const news = [];
console.log('we have', comments);
comments.forEach((comment) => {
const curDate = comment.updated_at || comment.created_at;
@ -131,7 +129,6 @@ export default function getApp(theState) {
return false;
}
localStorage[uiComDate] = minDate;
console.log('New date!', minDate);
localStorage[uiLastNewsArr] = JSON.stringify(news);
this.setNewsStatusTo(news);
return true;
@ -145,7 +142,9 @@ export default function getApp(theState) {
componentDidMount() {
if (!this.props.apis.antiCensorRu.ifFirstInstall) {
this.showNews();
}
}
@ -249,7 +248,6 @@ export default function getApp(theState) {
render(originalProps) {
console.log('Render');
const props = Object.assign({}, originalProps, {
funs: {
setStatusTo: this.setStatusTo,