Commit b5a842b5 authored by Marcelo Rivera's avatar Marcelo Rivera Committed by Mark Harding

[Sprint/GiddyGiraffe] (fix): legacy top links should redirect to discovery

parent 48ce390a
......@@ -57,10 +57,12 @@ export class BlogListComponent {
this.title.setTitle('Trending Blogs');
break;
case 'top':
if (!this.session.isLoggedIn()) {
this.router.navigate(['/login']);
}
this.filter = 'trending';
this.router.navigate(['/newsfeed/global/top', { 'type': 'blogs' }]);
// if (!this.session.isLoggedIn()) {
// this.router.navigate(['/login']);
// }
// this.filter = 'trending';
break;
case 'suggested':
if (!this.session.isLoggedIn()) {
......
......@@ -116,7 +116,14 @@ describe('ChannelComponent', () => {
featuresServiceMock.mock('channel-filter-feeds', false);
comp = fixture.componentInstance;
comp.username = 'username';
comp.user = { guid: 'guidguid', name: 'name', username: 'username', icontime: 11111, subscribers_count:182, impressions:18200};
comp.user = {
guid: 'guidguid',
name: 'name',
username: 'username',
icontime: 11111,
subscribers_count: 182,
impressions: 18200
};
comp.editing = false;
fixture.detectChanges();
......
......@@ -53,12 +53,14 @@ export class ChannelsListComponent {
this.uri = 'entities/all/channels';
break;
case 'top':
if (!this.session.isLoggedIn()) {
this.router.navigate(['/login']);
}
this.version = 'v2';
this.filter = 'trending';
this.uri = 'entities/suggested/channels';
this.router.navigate(['/newsfeed/global/top', { 'type': 'channels' }]);
// if (!this.session.isLoggedIn()) {
// this.router.navigate(['/login']);
// }
// this.version = 'v2';
// this.filter = 'trending';
// this.uri = 'entities/suggested/channels';
break;
case 'suggested':
if (!this.session.isLoggedIn()) {
......
......@@ -63,10 +63,12 @@ export class MediaImagesListComponent {
this.filter = 'network';
break;
case 'top':
if (!this.session.isLoggedIn()) {
this.router.navigate(['/login']);
}
this.filter = 'trending';
this.router.navigate(['/newsfeed/global/top', {'type': 'images'}]);
// if (!this.session.isLoggedIn()) {
// this.router.navigate(['/login']);
// }
// this.filter = 'trending';
break;
case 'suggested':
if (!this.session.isLoggedIn()) {
......
......@@ -64,10 +64,12 @@ export class MediaVideosListComponent {
this.filter = 'network';
break;
case 'top':
this.filter = 'trending';
if (!this.session.isLoggedIn()) {
this.router.navigate(['/login']);
}
this.router.navigate(['/newsfeed/global/top', { 'type': 'videos' }]);
// this.filter = 'trending';
// if (!this.session.isLoggedIn()) {
// this.router.navigate(['/login']);
// }
break;
case 'suggested':
if (!this.session.isLoggedIn()) {
......
Markdown is supported
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