From 9137537a3bb8e54e6ac4e2af62053e8c300d3491 Mon Sep 17 00:00:00 2001 From: Roland Date: Thu, 1 Dec 2022 09:54:37 -0700 Subject: [PATCH] Using Channel name in VideosPage title. --- app/src/components/Videos.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/app/src/components/Videos.js b/app/src/components/Videos.js index 77253d85..fc41984c 100644 --- a/app/src/components/Videos.js +++ b/app/src/components/Videos.js @@ -53,11 +53,6 @@ export function VideoWrapper() { } function VideosPage({filter}) { - let title = 'Videos'; - if (filter && filter.indexOf('favorite') >= 0) { - title = 'Favorite Videos'; - } - useTitle(title); const {channelId} = useParams(); const {searchParams, updateQuery} = useQuery(); @@ -83,6 +78,15 @@ function VideosPage({filter}) { const {channel} = useChannel(channelId); + let title = 'Videos'; + if (filter && filter.indexOf('favorite') >= 0) { + title = 'Favorite Videos'; + } + if (channel && channel.name) { + title = `${channel.name} Videos`; + } + useTitle(title); + const filterOptions = [ {text: 'Favorites', key: 'favorite', value: 'favorite'}, {text: 'Censored', key: 'censored', value: 'censored'},