mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-21 07:26:18 -05:00
Using Channel name in VideosPage title.
This commit is contained in:
parent
3739df4d0f
commit
9137537a3b
1 changed files with 9 additions and 5 deletions
|
|
@ -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'},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue