rsnext/test/integration/amphtml/pages/nested/index.js
JJ Kasper fa45fa0a60
Add export const config support and make withAmp a no-op (#7525)
* Add export const config support and make withAmp a no-op

* Use babel plugin for PageConfig

* Fix serverless-loader exports

* Add backwards compatibility for withAmp
2019-06-09 17:16:14 -07:00

8 lines
171 B
JavaScript

import { useAmp } from 'next/amp'
export const config = { amp: 'hybrid' }
export default () => {
const isAmp = useAmp()
return `Hello ${isAmp ? 'AMP' : 'others'}`
}