]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+video-channels/video-channels.component.ts
Fix search results on mobile
[github/Chocobozzz/PeerTube.git] / client / src / app / +video-channels / video-channels.component.ts
index 0c5c814c74d9dbd6065e93b924c1d056bca5ca2f..d2975b67c1720864213fa41ed216375c3ba6cfee 100644 (file)
@@ -15,7 +15,7 @@ import { I18n } from '@ngx-translate/i18n-polyfill'
   styleUrls: [ './video-channels.component.scss' ]
 })
 export class VideoChannelsComponent implements OnInit, OnDestroy {
-  @ViewChild('subscribeButton') subscribeButton: SubscribeButtonComponent
+  @ViewChild('subscribeButton', { static: false }) subscribeButton: SubscribeButtonComponent
 
   videoChannel: VideoChannel
   hotkeys: Hotkey[]
@@ -34,9 +34,9 @@ export class VideoChannelsComponent implements OnInit, OnDestroy {
   ngOnInit () {
     this.routeSub = this.route.params
                         .pipe(
-                          map(params => params[ 'videoChannelId' ]),
+                          map(params => params[ 'videoChannelName' ]),
                           distinctUntilChanged(),
-                          switchMap(videoChannelId => this.videoChannelService.getVideoChannel(videoChannelId)),
+                          switchMap(videoChannelName => this.videoChannelService.getVideoChannel(videoChannelName)),
                           catchError(err => this.restExtractor.redirectTo404IfNotFound(err, [ 400, 404 ]))
                         )
                         .subscribe(videoChannel => this.videoChannel = videoChannel)