Skip to content

Commit

Permalink
Fixes #755: Repeating data in sidebar, and Adress: #716 console errors
Browse files Browse the repository at this point in the history
  • Loading branch information
simsausaurabh committed Jun 17, 2018
1 parent 0d691dc commit 79ed6e6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/app/feed/info-box/info-box.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ <h4>Top Twitterers</h4>
<span class="label leaderboard-label">{{item[1].length}}</span>
</td>
<td class="leaderboard-text">
<a [routerLink]="['/search']" [queryParams]="{ query : 'from:' + item[0] }">@{{item[1]}}</a>
<a [routerLink]="['/search']" [queryParams]="{ query : 'from:' + item[1] }">@{{item[1]}}</a>
</td>
</tr>
</tbody>
Expand All @@ -28,7 +28,7 @@ <h4>Top Hashtags</h4>
<div class="leaderboard-count">{{item[1][0].length}}</div>
</td>
<td class="leaderboard-text">
<a [routerLink]="['/search']" [queryParams]="{ query : '#' + item[0] }">#{{item[1][0]}}</a>
<a [routerLink]="['/search']" [queryParams]="{ query : '#' + item[1][0] }">#{{item[1][0]}}</a>
</td>
</tr>
</tbody>
Expand All @@ -46,7 +46,7 @@ <h4>Top Mentions</h4>
<span class="label leaderboard-label">{{item[1][0].length}}</span>
</td>
<td class="leaderboard-text">
<a [routerLink]="['/search']" [queryParams]="{ query : 'from:' + item[0] }">@{{item[1][0]}}</a>
<a [routerLink]="['/search']" [queryParams]="{ query : 'from:' + item[1][0] }">@{{item[1][0]}}</a>
</td>
</tr>
</tbody>
Expand Down
2 changes: 2 additions & 0 deletions src/app/feed/info-box/info-box.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export class InfoBoxComponent implements OnInit, OnChanges {
}
sortTwiterers(statistics) {
let sortable = [];
statistics = statistics.filter((el, i, a) => i === a.indexOf(el));
if (statistics !== undefined && statistics.length !== 0) {
for (const s in statistics) {
if (s) {
Expand All @@ -88,6 +89,7 @@ export class InfoBoxComponent implements OnInit, OnChanges {
}
sortMentions(statistics) {
let sortable = [];
statistics = statistics.filter(([el], i, a) => i === a.indexOf(el));
if (statistics !== undefined && statistics.length !== 0) {
for (const s in statistics) {
if (s) {
Expand Down
2 changes: 1 addition & 1 deletion src/app/feed/user-info-box/user-info-box.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<h2>{{ apiResponseUser.name }}</h2>
<span>@{{ apiResponseUser.screen_name }}</span>
</div>
<div class="desc" *ngIf="apiResponseUser.description">
<div class="desc" *ngIf="apiResponseUser">
<feed-linker
[text]="apiResponseUser.description"
[useAll]="true"></feed-linker>
Expand Down

0 comments on commit 79ed6e6

Please sign in to comment.