cleaned up gallery
This commit is contained in:
parent
d436413ef7
commit
2851e0bb95
|
@ -155,9 +155,7 @@ export default function Gallery(props) {
|
||||||
const favItemIds = await getFavItemIds(data);
|
const favItemIds = await getFavItemIds(data);
|
||||||
setFavItemIds(favItemIds);
|
setFavItemIds(favItemIds);
|
||||||
|
|
||||||
loadingBar.current.continuousStart();
|
|
||||||
await syncWithRemote();
|
await syncWithRemote();
|
||||||
loadingBar.current.complete();
|
|
||||||
setIsFirstLoad(false);
|
setIsFirstLoad(false);
|
||||||
};
|
};
|
||||||
main();
|
main();
|
||||||
|
@ -165,6 +163,7 @@ export default function Gallery(props) {
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const syncWithRemote = async () => {
|
const syncWithRemote = async () => {
|
||||||
|
loadingBar.current.continuousStart();
|
||||||
const token = getToken();
|
const token = getToken();
|
||||||
const encryptionKey = await getActualKey();
|
const encryptionKey = await getActualKey();
|
||||||
const collections = await syncCollections(token, encryptionKey);
|
const collections = await syncCollections(token, encryptionKey);
|
||||||
|
@ -182,6 +181,7 @@ export default function Gallery(props) {
|
||||||
setFavItemIds(favItemIds);
|
setFavItemIds(favItemIds);
|
||||||
setSinceTime(new Date().getTime());
|
setSinceTime(new Date().getTime());
|
||||||
props.setUploadButtonView(true);
|
props.setUploadButtonView(true);
|
||||||
|
loadingBar.current.complete();
|
||||||
};
|
};
|
||||||
|
|
||||||
const updateUrl = (index: number) => (url: string) => {
|
const updateUrl = (index: number) => (url: string) => {
|
||||||
|
@ -334,16 +334,6 @@ export default function Gallery(props) {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const urlParams = new URLSearchParams(window.location.search);
|
|
||||||
const transactionStatus = urlParams.get('success');
|
|
||||||
let redirectMessage;
|
|
||||||
if (typeof transactionStatus != 'undefined') {
|
|
||||||
if (transactionStatus) {
|
|
||||||
const sessionId = urlParams.get('session_id');
|
|
||||||
if (sessionId) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<LoadingBar color="#2dc262" ref={loadingBar} />
|
<LoadingBar color="#2dc262" ref={loadingBar} />
|
||||||
|
|
Loading…
Reference in a new issue