@@ -35,7 +35,7 @@ const ThirdPartyAuth = ({
3535 showSeparator = true ,
3636 viewName = 'unknown' ,
3737 deeplink,
38- flowQueryParams
38+ flowQueryParams,
3939} : ThirdPartyAuthProps ) => {
4040 const config = useConfig ( ) ;
4141
@@ -79,7 +79,7 @@ const ThirdPartyAuth = ({
7979 < GoogleLogo />
8080 </ >
8181 ) ,
82- deeplink
82+ deeplink,
8383 } }
8484 />
8585 < ThirdPartySignInForm
@@ -99,7 +99,7 @@ const ThirdPartyAuth = ({
9999 < AppleLogo />
100100 </ >
101101 ) ,
102- deeplink
102+ deeplink,
103103 } }
104104 />
105105 </ div >
@@ -128,7 +128,7 @@ const ThirdPartySignInForm = ({
128128 onSubmit,
129129 viewName,
130130 deeplink,
131- flowQueryParams
131+ flowQueryParams,
132132} : {
133133 party : 'google' | 'apple' ;
134134 authorizationEndpoint : string ;
@@ -154,8 +154,16 @@ const ThirdPartySignInForm = ({
154154
155155 const getLoginAriaLabel = ( ) => {
156156 const labels = {
157- google : l10n . getString ( 'continue-with-google-button' , null , 'Continue with Google' ) ,
158- apple : l10n . getString ( 'continue-with-apple-button' , null , 'Continue with Apple' )
157+ google : l10n . getString (
158+ 'continue-with-google-button' ,
159+ null ,
160+ 'Continue with Google'
161+ ) ,
162+ apple : l10n . getString (
163+ 'continue-with-apple-button' ,
164+ null ,
165+ 'Continue with Apple'
166+ ) ,
159167 } ;
160168 return labels [ party ] ;
161169 } ;
@@ -197,24 +205,30 @@ const ThirdPartySignInForm = ({
197205 }
198206 } , [ party , stateRef , viewName , logViewEventOnce , flowQueryParams ] ) ;
199207
200-
201208 if ( onSubmit === undefined ) {
202209 onSubmit = ( ) => true ;
203210 }
204211
205212 useEffect ( ( ) => {
206213 if ( deeplink && formRef . current ) {
207214 // Only deeplink if this is the correct button
208- if ( ( deeplink === "googleLogin" && party === "google" ) || ( deeplink === "appleLogin" && party === "apple" ) ) {
215+ if (
216+ ( deeplink === 'googleLogin' && party === 'google' ) ||
217+ ( deeplink === 'appleLogin' && party === 'apple' )
218+ ) {
209219 onClick ( ) ;
210220 formRef . current . submit ( ) ;
211221 }
212222 }
213-
214223 } , [ deeplink , onClick , party ] ) ;
215224
216225 return (
217- < form action = { authorizationEndpoint } method = "GET" onSubmit = { onSubmit } ref = { formRef } >
226+ < form
227+ action = { authorizationEndpoint }
228+ method = "GET"
229+ onSubmit = { onSubmit }
230+ ref = { formRef }
231+ >
218232 < input
219233 data-testid = { `${ party } -signin-form-state` }
220234 ref = { stateRef }
@@ -235,15 +249,19 @@ const ThirdPartySignInForm = ({
235249 { ! isDeeplinking ? (
236250 < button
237251 type = "submit"
238- className = { `w-[60px] h-[60px] p-4 flex items-center justify-center rounded-full border border-transparent focus-visible-default outline-offset-2 ${
239- party === 'google' ? 'bg-[#F9F4F4]' : 'bg-black'
240- } `}
252+ className = { `w-[60px] h-[60px] p-4 flex items-center justify-center rounded-full border focus-visible-default outline-offset-2
253+ ${
254+ party === 'google'
255+ ? 'bg-[#F9F4F4] border-[#747775] border-[1px]'
256+ : 'bg-black border-transparent'
257+ }
258+ ` }
241259 onClick = { onClick }
242260 aria-label = { getLoginAriaLabel ( ) }
243261 >
244262 { buttonText }
245263 </ button >
246- ) : null }
264+ ) : null }
247265 </ form >
248266 ) ;
249267} ;
@@ -263,7 +281,10 @@ function getState(flowQueryParams: QueryParams | undefined) {
263281 const combinedParams = {
264282 ...paramsObject ,
265283 ...Object . fromEntries (
266- Object . entries ( flowQueryParams || { } ) . map ( ( [ key , value ] ) => [ key , String ( value ) ] )
284+ Object . entries ( flowQueryParams || { } ) . map ( ( [ key , value ] ) => [
285+ key ,
286+ String ( value ) ,
287+ ] )
267288 ) ,
268289 } ;
269290
@@ -278,7 +299,8 @@ function getState(flowQueryParams: QueryParams | undefined) {
278299 ] ) ;
279300 // we won't need these params that are used for internal backbone/react navigation
280301 return encodeURIComponent (
281- `${ window . location . origin } ${ window . location . pathname
302+ `${ window . location . origin } ${
303+ window . location . pathname
282304 } ?${ filteredParams . toString ( ) } `
283305 ) ;
284306}
0 commit comments