Using Channel name in VideosPage title.

This commit is contained in:
Roland 2022-12-01 09:54:37 -07:00
parent 3739df4d0f
commit 9137537a3b
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93

View file

@ -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'},