Cookies-EU-banner icon indicating copy to clipboard operation
Cookies-EU-banner copied to clipboard

With the need to translate the message you run into all kinds of issues

Open codingyourlife opened this issue 4 years ago • 0 comments

Hey! we decided on this banner but want to translate the message inside the banner via i18next. Therefore we need to have the Cookie banner as separate component. Therefore we need to import cookies-eu-banner via import statement. If I do that I run into issues like 'dataLayer' is not defined etc.

So steps to reproduce is simply:

import React from "react";
import CookiesEuBanner from "./cookies-eu-banner.js";

const CustomCookieConsent = () => {
	return (
		<>Please fix the errors you run into</>
	);
};
export default CustomCookieConsent;

It would be great to have such an example in the readme.

codingyourlife avatar Oct 23 '20 14:10 codingyourlife