@@ -42,8 +42,6 @@ import LoadingSpinner from '@salesforce/retail-react-app/app/components/loading-
4242import { getConfig } from '@salesforce/pwa-kit-runtime/utils/ssr-config'
4343import { useMultiship } from '@salesforce/retail-react-app/app/hooks/use-multiship'
4444import { GoogleAPIProvider } from '@salesforce/retail-react-app/app/pages/checkout/util/google-api-provider'
45- import { usePasskeyRegistration } from '@salesforce/retail-react-app/app/hooks/use-passkey-registration'
46- import { useCustomerType } from '@salesforce/commerce-sdk-react'
4745
4846const Checkout = ( ) => {
4947 const { formatMessage} = useIntl ( )
@@ -54,16 +52,13 @@ const Checkout = () => {
5452 const [ isLoading , setIsLoading ] = useState ( false )
5553 const { mutateAsync : createOrder } = useShopperOrdersMutation ( 'createOrder' )
5654 const config = getConfig ( )
57- const { passwordless = { } , social = { } , passkey = { } } = config . app . login || { }
55+ const { passwordless = { } , social = { } } = config . app . login || { }
5856 const idps = social ?. idps
5957 const isSocialEnabled = ! ! social ?. enabled
6058 const isPasswordlessEnabled = ! ! passwordless ?. enabled
6159 const { removeEmptyShipments} = useMultiship ( basket )
6260 const multishipEnabled = config ?. app ?. multishipEnabled ?? true
6361
64- const { showToast} = usePasskeyRegistration ( )
65- const { isRegistered} = useCustomerType ( )
66-
6762 // cart has both pickup and delivery orders
6863 const isDeliveryAndPickupOrder =
6964 multishipEnabled &&
@@ -90,31 +85,6 @@ const Checkout = () => {
9085 }
9186 } , [ basket ?. basketId ] )
9287
93- // Passkey registration
94- useEffect ( ( ) => {
95- // Show passkey registration modal only if Webauthn feature flag is enabled and compatible with the browser
96- if ( isRegistered && passkey ?. enabled ) {
97- if (
98- window . PublicKeyCredential &&
99- // eslint-disable-next-line no-undef
100- PublicKeyCredential . isUserVerifyingPlatformAuthenticatorAvailable &&
101- // eslint-disable-next-line no-undef
102- PublicKeyCredential . isConditionalMediationAvailable
103- ) {
104- Promise . all ( [
105- // eslint-disable-next-line no-undef
106- PublicKeyCredential . isUserVerifyingPlatformAuthenticatorAvailable ( ) ,
107- // eslint-disable-next-line no-undef
108- PublicKeyCredential . isConditionalMediationAvailable ( )
109- ] ) . then ( ( results ) => {
110- if ( results . every ( ( r ) => r === true ) ) {
111- showToast ( )
112- }
113- } )
114- }
115- }
116- } , [ isRegistered ] )
117-
11888 const submitOrder = async ( ) => {
11989 setIsLoading ( true )
12090 try {
0 commit comments