External Script in Head

      <Head>
        <meta name="description" content={state.frontity.description} />
        <html lang="en" />
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous"
    		/>
    		<Script code={`
    			(function(a,s,y,n,c,h,i,d,e){s.className+=' '+y;h.start=1*new Date;
    			h.end=i=function(){s.className=s.className.replace(RegExp(' ?'+y),'')};
    			(a[n]=a[n]||[]).hide=h;setTimeout(function(){i();h.end=null},c);h.timeout=c;
    			})(window,document.documentElement,'async-hide','dataLayer',4000,
    			{'CONTAINER_ID':true});
    			`} 
    		/>
      </Head>

This is giving me this error, how do I resolve this? Or is their a better way to implement this code snippet?

Invariant Violation: You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.
      at invariant (webpack-internal:///./node_modules/invariant/invariant.js:15:447)
      at r.o.warnOnInvalidChildren (webpack-internal:///./node_modules/react-helmet-async/lib/index.module.js:14:11049)
      at eval (webpack-internal:///./node_modules/react-helmet-async/lib/index.module.js:14:12034)
      at eval (webpack-internal:///./node_modules/react/cjs/react.development.js:264:110)
      at eval (webpack-internal:///./node_modules/react/cjs/react.development.js:244:173)
      at mapIntoArray (webpack-internal:///./node_modules/react/cjs/react.development.js:224:316)
      at mapIntoArray (webpack-internal:///./node_modules/react/cjs/react.development.js:231:210)
      at mapChildren (webpack-internal:///./node_modules/react/cjs/react.development.js:244:110)
      at Object.forEachChildren [as forEach] (webpack-internal:///./node_modules/react/cjs/react.development.js:264:66)
      at r.o.mapChildrenToProps (webpack-internal:///./node_modules/react-helmet-async/lib/index.module.js:14:11829)

Hi @ryanaker

See the last comment in this thread. Perhaps you can include the <Head> component inside the function so that the function is not a Helmet dependency.