12cbb934b3
* Add support for .amp.js pages and resolving /page?amp=1 to page.amp.js * Update amp tests * Update example and clean up amp page resolving * Add nested amp test * page => normalizedPage * Add type to page options * Add handling of amp with all pageExtensions and normalize page * Make sure findPageFile only falls back to amp if enabled
6 lines
130 B
JavaScript
6 lines
130 B
JavaScript
import { useAmp } from 'next/amp'
|
|
|
|
export default () => {
|
|
const isAmp = useAmp()
|
|
return `Hello ${isAmp ? 'AMP' : 'others'}`
|
|
}
|