feat: show loading when logging out

This commit is contained in:
thecodrr
2021-01-13 00:49:24 +05:00
parent c070e1ebed
commit 21bc1f2ed7
2 changed files with 13 additions and 2 deletions

View File

@@ -8,7 +8,7 @@ function Placeholder(props) {
useEffect(() => {
changeSvgTheme(accent);
}, [accent]);
const { image: Image, title, text, callToAction } = props;
const { image: Image, text, callToAction } = props;
return (
<>

View File

@@ -257,7 +257,18 @@ function Settings(props) {
variant="list"
onClick={async () => {
if (await showLogoutConfirmation()) {
await db.user.logout(true);
await showLoadingDialog({
title: "Logging you out",
subtitle: "We are logging you out. Please wait...",
action: async () => {
await db.user.logout(true);
},
message: (
<Text color="error">
Please do NOT close your browser or shut down your PC.
</Text>
),
});
showToast("success", "You have been logged out.");
}
}}