Changing Archive Sync to Update and Alternatives to History.

This commit is contained in:
Roland 2022-11-14 15:42:57 -07:00
parent a17eb6559e
commit 11bd59cec0
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
7 changed files with 51 additions and 53 deletions

View file

@ -81,13 +81,13 @@ export const useDomains = () => {
export const useArchive = (archiveId) => {
const [archiveFile, setArchiveFile] = useState(null);
const [alternatives, setAlternatives] = useState(null);
const [history, setHistory] = useState(null);
const fetchArchive = async () => {
try {
const [file, alt] = await getArchive(archiveId);
const [file, history] = await getArchive(archiveId);
setArchiveFile(file);
setAlternatives(alt);
setHistory(history);
} catch (e) {
console.error(e);
setArchiveFile(undefined);
@ -98,7 +98,7 @@ export const useArchive = (archiveId) => {
fetchArchive();
}, [archiveId]);
return {archiveFile, alternatives};
return {archiveFile, history};
}
export const useQuery = () => {