File tree Expand file tree Collapse file tree 5 files changed +11
-14
lines changed
packages/elements-react/src Expand file tree Collapse file tree 5 files changed +11
-14
lines changed Original file line number Diff line number Diff line change @@ -66,9 +66,7 @@ export function OryFormOidcButtons() {
66
66
export function OryFormSocialButtonsForm ( ) {
67
67
const {
68
68
flow : { ui } ,
69
- formState,
70
69
} = useOryFlow ( )
71
- console . log ( formState )
72
70
73
71
// Only get the oidc nodes.
74
72
const filteredNodes = ui . nodes . filter (
Original file line number Diff line number Diff line change @@ -97,7 +97,6 @@ export function OryConfigurationProvider({
97
97
98
98
function computeSdkConfig ( config ?: OryClientConfiguration [ "sdk" ] ) : SDKConfig {
99
99
if ( config ?. url && typeof config . url === "string" ) {
100
- console . debug ( "Using sdk url from config" )
101
100
return {
102
101
url : config . url . replace ( / \/ $ / , "" ) ,
103
102
options : config . options || { } ,
Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ function LogoutButton({ returnTo }: LogoutButtonProps) {
190
190
191
191
function RegistrationCardFooter ( ) {
192
192
const intl = useIntl ( )
193
- const { flow, formState } = useOryFlow ( )
193
+ const { flow, formState, dispatchFormState } = useOryFlow ( )
194
194
const config = useOryConfiguration ( )
195
195
const visibleGroups = useNodeGroupsWithVisibleNodes ( flow . ui . nodes )
196
196
const authMethodBlocks = toAuthMethodPickerOptions ( visibleGroups )
@@ -203,19 +203,22 @@ function RegistrationCardFooter() {
203
203
}
204
204
205
205
return (
206
- < span className = "font-normal leading-normal antialiased" >
207
- < a
208
- className = "font-medium text-button-link-brand-brand hover:text-button-link-brand-brand-hover"
209
- // This works, because it essentially reloads the page.
210
- // TODO: this should not do a full reload, but rather just update the state.....
211
- href = ""
206
+ < span className = "font-normal leading-normal antialiased text-interface-foreground-default-primary" >
207
+ < button
208
+ className = "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline"
209
+ onClick = { ( ) => {
210
+ dispatchFormState ( {
211
+ type : "action_clear_active_method" ,
212
+ } )
213
+ } }
212
214
data-testid = { "ory/screen/registration/action/selectMethod" }
215
+ type = "button"
213
216
>
214
217
{ intl . formatMessage ( {
215
218
id : "card.footer.select-another-method" ,
216
219
defaultMessage : "Select another method" ,
217
220
} ) }
218
- </ a >
221
+ </ button >
219
222
</ span >
220
223
)
221
224
case "select_method" :
Original file line number Diff line number Diff line change @@ -80,8 +80,6 @@ function UnlinkRow({ button }: UnlinkRowProps) {
80
80
}
81
81
} , [ isSubmitting , setClicked ] )
82
82
83
- console . log ( button . meta . label ?. context )
84
-
85
83
return (
86
84
< div key = { attrs . value } className = "flex justify-between" >
87
85
< div className = "flex items-center gap-6" >
Original file line number Diff line number Diff line change @@ -47,7 +47,6 @@ export function handleContinueWith(
47
47
if ( isSetOrySessionToken ( action ) ) {
48
48
throw new Error ( "Ory Elements does not support API flows yet." )
49
49
} else if ( isRedirectBrowserTo ( action ) && action . redirect_browser_to ) {
50
- // console.log("Redirecting to", action.redirect_browser_to)
51
50
onRedirect ( action . redirect_browser_to , true )
52
51
return true
53
52
} else if ( isShowVerificationUi ( action ) ) {
You can’t perform that action at this time.
0 commit comments