Skip to content

Commit

Permalink
Logout or reset database without having to reload.
Browse files Browse the repository at this point in the history
  • Loading branch information
dfahlander committed Jul 3, 2023
1 parent c3705a7 commit 22a7b66
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export function ResetDatabaseButton() {
className="large-button"
onClick={async () => {
await db.delete();
window.location.reload();
await db.open();
}}
>
<FontAwesomeIcon icon={faDatabase} /> Factory reset client
Expand Down
2 changes: 1 addition & 1 deletion samples/dexie-cloud-todo-app/src/db/logout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import { db } from "./db";

export async function logout() {
await db.delete();
window.location.reload();
await db.open();
}

0 comments on commit 22a7b66

Please sign in to comment.