Skip to content

Commit

Permalink
fix(form-builder): skip href for disabled intent buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoerge committed Apr 20, 2021
1 parent ba30e92 commit 3f33244
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ export function IntentButton(
) {
const router = useRouter()

return <Button {...props} as="a" href={router.resolveIntentLink(props.intent, props.params)} />
const href = props.disabled ? undefined : router.resolveIntentLink(props.intent, props.params)
return <Button {...props} as="a" href={href} />
}

0 comments on commit 3f33244

Please sign in to comment.