mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-28 19:06:19 -05:00
Adding useTitle to every function page.
This commit is contained in:
parent
1033b0c38f
commit
5bf648001b
12 changed files with 55 additions and 12 deletions
|
|
@ -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 => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue