Skip to content

Commit ea98753

Browse files
committed
useEffect
1 parent 0341ce5 commit ea98753

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

dotcom-rendering/src/components/SignInGateSelector.importable.tsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { getCookie, isUndefined, storage } from '@guardian/libs';
2-
import { useState } from 'react';
2+
import { useEffect, useState } from 'react';
33
import { constructQuery } from '../lib/querystring';
44
import { useIsInView } from '../lib/useIsInView';
55
import { useOnce } from '../lib/useOnce';
@@ -369,7 +369,7 @@ const ShowSignInGateAuxia = ({
369369
threshold: 0,
370370
});
371371

372-
useOnce(() => {
372+
useEffect(() => {
373373
if (hasBeenSeen) {
374374
void auxiaLogTreatmentInteraction(
375375
contributionsServiceUrl,
@@ -406,7 +406,15 @@ const ShowSignInGateAuxia = ({
406406
// the tracking of the number of times the gate has been displayed
407407
incrementGateDisplayCount();
408408
}
409-
}, [componentId, hasBeenSeen]);
409+
}, [
410+
componentId,
411+
hasBeenSeen,
412+
browserId,
413+
contributionsServiceUrl,
414+
renderingTarget,
415+
treatmentId,
416+
userTreatment,
417+
]);
410418

411419
return (
412420
<div ref={setNode}>

0 commit comments

Comments
 (0)