mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-01 04:16:24 -05:00
Changing Archive Sync to Update and Alternatives to History.
This commit is contained in:
parent
a17eb6559e
commit
11bd59cec0
7 changed files with 51 additions and 53 deletions
|
|
@ -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 = () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue