wip: multi account

This commit is contained in:
Ren Amamiya
2023-09-28 13:58:50 +07:00
parent 0e6fc65b08
commit 4f4e2f5ccd
11 changed files with 59 additions and 30 deletions

View File

@@ -11,13 +11,13 @@ export function Logout() {
const { db } = useStorage();
const navigate = useNavigate();
const clearPrivkey = useStronghold((state) => state.clearPrivkey);
const resetStronghold = useStronghold((state) => state.reset);
const logout = async () => {
// remove account
db.accountLogout();
// clear privkey in session storage
clearPrivkey();
resetStronghold();
// redirect to welcome screen
navigate('/auth/welcome');
};

View File

@@ -56,7 +56,7 @@ export function EventLoader({ firstTime }: { firstTime: boolean }) {
) : (
<div className="text-center">
<h3 className="font-semibold leading-tight">
Downloading all events from your last login...
Downloading all events while you&apos;re away...
</h3>
</div>
)}