From bcec0177e07c31ff8fcd73679c82098314eb5dfa Mon Sep 17 00:00:00 2001 From: Arturo Date: Sun, 30 Apr 2023 19:28:28 -0700 Subject: [PATCH] Add confirmation dialog on 'Clear'. --- example/src/App.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/example/src/App.tsx b/example/src/App.tsx index dfd08f0..f51244e 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -145,7 +145,9 @@ const App = (props: any) => { } function clearCharacter() { - updateCharacter({ }) + if (window.confirm("Are you sure?")) { + updateCharacter({ }) + } } function getDefaultRedirect(search: string | undefined) {