Skip to content

Commit

Permalink
make typescript happy
Browse files Browse the repository at this point in the history
  • Loading branch information
david-crespo committed Jun 29, 2022
1 parent df04b09 commit d69946c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/pages/DeviceAuthVerifyPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,12 @@ export default function DeviceAuthVerifyPage() {
<h3 className="mb-2 text-center text-sans-2xl">Device authorization</h3>
<h2 className="mb-2 text-center text-sans-2xl">User code: {userCode}</h2>
<Button
type="submit"
className="w-full"
disabled={confirmPost.isLoading}
onClick={() => confirmPost.mutate({ body: { user_code: userCode } })}
disabled={confirmPost.isLoading || !userCode}
onClick={() => {
// assume userCode is non-null because the button is disabled otherwise
confirmPost.mutate({ body: { userCode: userCode! } })
}}
>
Verify
</Button>
Expand Down

0 comments on commit d69946c

Please sign in to comment.