Adding useTitle to every function page.

This commit is contained in:
Roland 2022-10-25 15:57:44 -06:00
parent 1033b0c38f
commit 5bf648001b
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
12 changed files with 55 additions and 12 deletions

View file

@ -24,7 +24,8 @@ import {
SearchInput,
TabLinks,
textEllipsis,
uploadDate
uploadDate,
useTitle
} from "./Common";
import {deleteArchives, postDownload} from "../api";
import {Link, Route, Routes, useNavigate, useParams} from "react-router-dom";
@ -44,6 +45,12 @@ function ArchivePage() {
const {archiveId} = useParams();
const {archiveFile, alternatives} = useArchive(archiveId);
let title;
if (archiveFile && archiveFile.archive) {
title = archiveFile.archive.title;
}
useTitle(title);
if (archiveFile === null) {
return <Segment><Loader active/></Segment>;
}
@ -195,6 +202,8 @@ export function ArchiveCard({file}) {
}
export function Domains() {
useTitle('Archive Domains');
const [domains] = useDomains();
const [searchStr, setSearchStr] = useState('');
@ -258,6 +267,8 @@ function Archives() {
const [selectedArchives, setSelectedArchives] = useState([]);
const [deleteOpen, setDeleteOpen] = useState(false);
useTitle('Archives');
let filterOptions = [];
if (domains && domains.length > 0) {
domains.forEach(i => {