Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting errors while trying to added a Material Ui component with AMP #911

Open
kiraahmad opened this issue Jun 23, 2021 · 0 comments
Open

Comments

@kiraahmad
Copy link

I made a very simple page to test AMP with Material UI and Next JS, However, when I try to render this page

import React from 'react'
import Button from '@material-ui/core/Button'

const testamp = () => {
return (
<div>
Hello World
<Button >
LOGIN
</Button>
</div>
)
}
export default testamp
export const config = { amp: true }

I get the following error:

/testamp error The parent tag of tag 'style amp-custom' is 'div', but it can only be 'head'.
error The parent tag of tag 'style amp-custom' is 'div', but it can only be 'head'.
error The parent tag of tag 'style amp-custom' is 'button', but it can only be 'head'.

what could be the problem here ? specially that I just added a very simple component here with no styling

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant