import * as AlertDialog from '@radix-ui/react-alert-dialog'; import { useNavigate } from 'react-router-dom'; import { useStorage } from '@libs/storage/provider'; import { LogoutIcon } from '@shared/icons'; import { useStronghold } from '@stores/stronghold'; export function Logout() { const { db } = useStorage(); const navigate = useNavigate(); const clearPrivkey = useStronghold((state) => state.clearPrivkey); const logout = async () => { // remove account db.accountLogout(); // clear privkey in session storage clearPrivkey(); // redirect to welcome screen navigate('/auth/welcome'); }; return (
Are you sure! You can always log back in at any time. If you just want to switch accounts, you can do that by adding an existing account.
); }