Skip to content

Commit dcdcc2e

Browse files
committed
Moving on
1 parent ae15527 commit dcdcc2e

File tree

1 file changed

+7
-19
lines changed

1 file changed

+7
-19
lines changed

src/gdpr/ConsentBannerAndConsentManagement.tsx

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -113,18 +113,12 @@ function createConsentBanner<Finality extends string>(params: {
113113

114114
const [isProcessingChanges, setIsProcessingChanges] = useState(false);
115115

116-
console.log("consent banner render", { isProcessingChanges });
117-
118116
useEffect(() => {
119117
if (!isBrowser) {
120118
return;
121119
}
122120

123121
setHostname(location.host);
124-
125-
return () => {
126-
console.log("consent banner cleanup");
127-
};
128122
}, []);
129123

130124
return (
@@ -250,17 +244,13 @@ function createConsentManagement<
250244
setLocalFinalityConsent(realFinalityConsent);
251245
}, [realFinalityConsent]);
252246

253-
const { processConsentChanges } = useMemo(
254-
() =>
255-
createProcessConsentChanges({
256-
"callback": undefined,
257-
finalities,
258-
"getFinalityConsent": () => localFinalityConsent,
259-
"setFinalityConsent": ({ finalityConsent }) =>
260-
setLocalFinalityConsent(finalityConsent)
261-
}),
262-
[]
263-
);
247+
const { processConsentChanges } = createProcessConsentChanges({
248+
"callback": undefined,
249+
finalities,
250+
"getFinalityConsent": () => localFinalityConsent,
251+
"setFinalityConsent": ({ finalityConsent }) =>
252+
setLocalFinalityConsent(finalityConsent)
253+
});
264254

265255
const processLocalConsentChange: (
266256
params:
@@ -440,8 +430,6 @@ function createConsentManagement<
440430
}) {
441431
const { title, description, subFinalities, finalityConsent, onChange } = props;
442432

443-
console.log(finalityConsent);
444-
445433
const { legendId, descriptionId, acceptInputId, refuseInputId, subFinalityDivId } =
446434
(function useClosure() {
447435
const id = useId();

0 commit comments

Comments
 (0)