Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
poolsar42 committed Jun 15, 2023
1 parent 9bdfb4f commit 6174b4c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions apps/passport/app/components/applications/claims.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Form } from '@remix-run/react'
import { Form, useTransition } from '@remix-run/react'

import { Button, Text } from '@proofzero/design-system'
import { FaChevronDown, FaChevronRight } from 'react-icons/fa'
Expand Down Expand Up @@ -29,6 +29,7 @@ export const ConfirmRevocationModal = ({
setIsOpen: (val: boolean) => void
}) => {
const [confirmationString, setConfirmationString] = useState('')
const transition = useTransition()

return (
<Modal isOpen={isOpen} handleClose={() => setIsOpen(false)}>
Expand Down Expand Up @@ -68,6 +69,7 @@ export const ConfirmRevocationModal = ({
btnType="secondary-alt"
onClick={() => setIsOpen(false)}
className="bg-gray-100 hover:bg-gray-200"
disabled={transition.state !== 'idle'}
>
Cancel
</Button>
Expand All @@ -79,7 +81,9 @@ export const ConfirmRevocationModal = ({
<Button
type="submit"
btnType="dangerous-alt"
disabled={confirmationString !== 'REVOKE'}
disabled={
confirmationString !== 'REVOKE' || transition.state !== 'idle'
}
>
Revoke Access
</Button>
Expand Down

0 comments on commit 6174b4c

Please sign in to comment.