rsnext/test/integration/amphtml/pages/custom-scripts.js
JJ Kasper e5111745b5
Replace .amp.js with withAmp(Comp) (#7009)
* Add WithAmp to enable AMP support for
pages instead of .amp.js

* Update handling for exporting AMP

* Fix ampPath in export for / path and
revert isAmp logic to handle right

* Update amphtml test suite

* Add handling for noDirtyAmp during
export and update amp-export test suite

* Update serverless and export-default-map
test suites

* Update require-page tests
2019-04-11 13:59:26 -05:00

14 lines
349 B
JavaScript

import Head from 'next/head'
import { withAmp } from 'next/amp'
export default withAmp(() => (
<div>
<Head>
<script src='/im-not-allowed.js' type='text/javascript' />
<script dangerouslySetInnerHTML={{
__html: `console.log("I'm not either :p")`
}} />
</Head>
<p>We only allow AMP scripts now</p>
</div>
))