diff --git a/packages/demobank-ui/src/pages/LoginForm.tsx b/packages/demobank-ui/src/pages/LoginForm.tsx index 0fbbef7c3..786399d55 100644 --- a/packages/demobank-ui/src/pages/LoginForm.tsx +++ b/packages/demobank-ui/src/pages/LoginForm.tsx @@ -55,6 +55,10 @@ export function LoginForm({ onRegister }: { onRegister?: () => void }): VNode { notifyError(title, description, debug) } + async function doLogout() { + backend.logOut() + } + async function doLogin() { if (!username || !password) return; setBusy({}) @@ -198,7 +202,7 @@ export function LoginForm({ onRegister }: { onRegister?: () => void }): VNode { class="rounded-md bg-white-600 px-3 py-1.5 text-sm font-semibold leading-6 text-black shadow-sm hover:bg-gray-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gray-600" onClick={(e) => { e.preventDefault() - doLogin() + doLogout() }} > Cancel