Skip to content

Commit

Permalink
Fix ad under header
Browse files Browse the repository at this point in the history
  • Loading branch information
andre-pullinen committed Dec 15, 2020
1 parent 5351eba commit 4480ee5
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions js/src/forum/addAdBetweenPosts.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { extend } from 'flarum/extend';
import app from 'flarum/app';
import PostStream from 'flarum/components/PostStream';
import AdPostType from './components/AdPostType';

export default function() {
extend(PostStream.prototype, 'view', function(component) {
Expand All @@ -18,12 +17,11 @@ export default function() {
const postNum = post.attrs['data-number'];
if (postNum === start || ((postNum - start) % between) === 0) {
post.children.push(
AdPostType.component({post: advertisement}, advertisement),
// m('div.Flagrow-Ads-fake-poststream-item',
// m('article.Post.EventPost',
// m('div.Flagrow-Ads-between-posts.EventPost-info', m.trust(advertisement))
// )
// )
m('div.Flagrow-Ads-fake-poststream-item',
m('article.Post.EventPost',
m('div.Flagrow-Ads-between-posts.EventPost-info', m.trust(advertisement))
)
)
);
}
});
Expand Down

0 comments on commit 4480ee5

Please sign in to comment.