Skip to content

Commit 5d38a82

Browse files
author
George Haberis
committed
move function out of useEffect
1 parent 2ef4ed7 commit 5d38a82

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ import { useBetaAB } from '../lib/useAB';
1616
* (No visual story exists as this does not render anything)
1717
*/
1818
export const EnhanceAffiliateLinks = () => {
19+
const abTests = useBetaAB();
20+
1921
useEffect(() => {
2022
const allLinksOnPage = [...document.querySelectorAll('a')];
21-
const abTests = useBetaAB();
2223

2324
for (const link of allLinksOnPage) {
2425
if (isSkimlink(link.href)) {

0 commit comments

Comments
 (0)