File tree Expand file tree Collapse file tree 2 files changed +15
-6
lines changed
packages/template-retail-react-app/app
components/passkey-registration-modal Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,6 @@ const PasskeyRegistrationModal = ({isOpen, onClose}) => {
5050 const form = useForm ( )
5151
5252 const config = getConfig ( )
53- const commerceApiConfig = config . app . commerceAPI
5453 const webauthnConfig = config . app . login . passkey
5554 const authorizeWebauthnRegistration = useAuthHelper ( AuthHelpers . AuthorizeWebauthnRegistration )
5655
@@ -62,7 +61,6 @@ const PasskeyRegistrationModal = ({isOpen, onClose}) => {
6261 await authorizeWebauthnRegistration . mutateAsync ( {
6362 user_id : customer . email ,
6463 mode : webauthnConfig . mode ,
65- channel_id : commerceApiConfig . parameters . siteId ,
6664 ...( webauthnConfig . mode === 'callback' && {
6765 callback_uri : webauthnConfig . callbackURI
6866 } )
@@ -130,7 +128,7 @@ const PasskeyRegistrationModal = ({isOpen, onClose}) => {
130128 < FormControl >
131129 < FormLabel >
132130 { formatMessage ( {
133- defaultMessage : 'Passkey Nickname' ,
131+ defaultMessage : 'Passkey Nickname (optional) ' ,
134132 id : 'auth_modal.passkey.label.nickname'
135133 } ) }
136134 </ FormLabel >
Original file line number Diff line number Diff line change 66 */
77
88import React from 'react'
9+ import { useIntl } from 'react-intl'
910import {
1011 Box ,
1112 Button ,
@@ -21,6 +22,7 @@ import {usePasskeyRegistrationContext} from '@salesforce/retail-react-app/app/co
2122export const usePasskeyRegistration = ( ) => {
2223 const toast = useToast ( )
2324 const { passkeyModal} = usePasskeyRegistrationContext ( )
25+ const { formatMessage} = useIntl ( )
2426
2527 const showToast = ( ) => {
2628 toast ( {
@@ -43,10 +45,16 @@ export const usePasskeyRegistration = () => {
4345 top = { 2 }
4446 color = "white"
4547 onClick = { onClose }
46- aria-label = "Close toast"
48+ aria-label = { formatMessage ( {
49+ id : 'passkey_registration.toast.button.close.assistive_msg' ,
50+ defaultMessage : 'Close toast'
51+ } ) }
4752 />
4853 < Box mb = { 3 } fontWeight = "medium" >
49- Create a passkey for a more secure and easier login
54+ { formatMessage ( {
55+ id : 'passkey_registration.toast.message' ,
56+ defaultMessage : 'Create a passkey for a more secure and easier login'
57+ } ) }
5058 </ Box >
5159 < Button
5260 size = "sm"
@@ -56,7 +64,10 @@ export const usePasskeyRegistration = () => {
5664 passkeyModal . onOpen ( )
5765 } }
5866 >
59- Create Passkey
67+ { formatMessage ( {
68+ id : 'passkey_registration.toast.button.create' ,
69+ defaultMessage : 'Create Passkey'
70+ } ) }
6071 </ Button >
6172 </ Box >
6273 )
You can’t perform that action at this time.
0 commit comments