Working on a next.js project, wanted to implement AMP pages for mobile view. I have added the following <style> tag in the <head> inside app.js:
<style amp-custom="" dangerouslySetInnerHTML={{__html: MY_CSS_FILE}}>
I am validating AMP via https://validator.ampproject.org/ and getting the following error -
The tag "style amp-custom" appears more than once in the document.
This is because of this extra tag which is appearing in the page source and in turn failing the AMP validation.
According to AMP's official documentation, there should be only one mandatory tag. Looking at the code, I am not sure where this extra tag is coming from and how to remove it.
Any help would be really appreciated!