Skip to content

Commit

Permalink
Fix signup/create button cancel states (#1122)
Browse files Browse the repository at this point in the history
* Fix signup/create button cancel states

* format
  • Loading branch information
broody authored Dec 9, 2024
1 parent 710a7c0 commit 59c866c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 25 deletions.
40 changes: 16 additions & 24 deletions packages/keychain/src/components/connect/CreateSession.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,30 +130,22 @@ export function CreateSession({
{error && isControllerError(error) && (
<ControllerErrorAlert error={error} />
)}
{!error && (
<HStack spacing={4} width="full">
<Button
onClick={() => onConnect()}
isDisabled={isConnecting}
px={10}
>
Skip
</Button>
<Button
colorScheme="colorful"
isDisabled={
isDisabled ||
isConnecting ||
(!policies?.verified && !isConsent)
}
isLoading={isConnecting}
onClick={() => onCreateSession()}
width="full"
>
{isUpdate ? "update" : "create"} session
</Button>
</HStack>
)}
<HStack spacing={4} width="full">
<Button onClick={() => onConnect()} isDisabled={isConnecting} px={10}>
Skip
</Button>
<Button
colorScheme="colorful"
isDisabled={
isDisabled || isConnecting || (!policies?.verified && !isConsent)
}
isLoading={isConnecting}
onClick={() => onCreateSession()}
width="full"
>
{isUpdate ? "update" : "create"} session
</Button>
</HStack>
</Footer>
</Container>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export function CreateControllerView({
<Button
colorScheme="colorful"
isLoading={isLoading}
isDisabled={validation.status !== "valid" || !!error}
isDisabled={validation.status !== "valid"}
onClick={onSubmit}
>
{validation.exists ? "login" : "sign up"}
Expand Down

0 comments on commit 59c866c

Please sign in to comment.