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() {
6666export function OryFormSocialButtonsForm ( ) {
6767 const {
6868 flow : { ui } ,
69- formState,
7069 } = useOryFlow ( )
71- console . log ( formState )
7270
7371 // Only get the oidc nodes.
7472 const filteredNodes = ui . nodes . filter (
Original file line number Diff line number Diff line change @@ -97,7 +97,6 @@ export function OryConfigurationProvider({
9797
9898function computeSdkConfig ( config ?: OryClientConfiguration [ "sdk" ] ) : SDKConfig {
9999 if ( config ?. url && typeof config . url === "string" ) {
100- console . debug ( "Using sdk url from config" )
101100 return {
102101 url : config . url . replace ( / \/ $ / , "" ) ,
103102 options : config . options || { } ,
Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ function LogoutButton({ returnTo }: LogoutButtonProps) {
190190
191191function RegistrationCardFooter ( ) {
192192 const intl = useIntl ( )
193- const { flow, formState } = useOryFlow ( )
193+ const { flow, formState, dispatchFormState } = useOryFlow ( )
194194 const config = useOryConfiguration ( )
195195 const visibleGroups = useNodeGroupsWithVisibleNodes ( flow . ui . nodes )
196196 const authMethodBlocks = toAuthMethodPickerOptions ( visibleGroups )
@@ -203,19 +203,22 @@ function RegistrationCardFooter() {
203203 }
204204
205205 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+ } }
212214 data-testid = { "ory/screen/registration/action/selectMethod" }
215+ type = "button"
213216 >
214217 { intl . formatMessage ( {
215218 id : "card.footer.select-another-method" ,
216219 defaultMessage : "Select another method" ,
217220 } ) }
218- </ a >
221+ </ button >
219222 </ span >
220223 )
221224 case "select_method" :
Original file line number Diff line number Diff line change @@ -80,8 +80,6 @@ function UnlinkRow({ button }: UnlinkRowProps) {
8080 }
8181 } , [ isSubmitting , setClicked ] )
8282
83- console . log ( button . meta . label ?. context )
84-
8583 return (
8684 < div key = { attrs . value } className = "flex justify-between" >
8785 < div className = "flex items-center gap-6" >
Original file line number Diff line number Diff line change @@ -47,7 +47,6 @@ export function handleContinueWith(
4747 if ( isSetOrySessionToken ( action ) ) {
4848 throw new Error ( "Ory Elements does not support API flows yet." )
4949 } else if ( isRedirectBrowserTo ( action ) && action . redirect_browser_to ) {
50- // console.log("Redirecting to", action.redirect_browser_to)
5150 onRedirect ( action . redirect_browser_to , true )
5251 return true
5352 } else if ( isShowVerificationUi ( action ) ) {
You can’t perform that action at this time.
0 commit comments