rsnext/test/integration/export-default-map/pages
Joe Haddad 39761e5ce7 Remove withAmp and do not expose isInAmpMode (#7690)
* Remove `withAmp` and do not expose `isInAmpMode`
This pull request removes the `withAmp` higher-order component in favor of the exported configuration object.
Retaining this backwards compatibility isn't worth the extra maintenance burden, given it hasn't been released for very long and the migration is ultra-simple.

I'm 👎 on retaining backwards compatibility just for the sake of it.

Migration example follows. I'm willing to write a codemod if reviewers feel it's necessary.

*Before*
```js
import { withAmp } from 'next/amp'

function Home() {
  return <h1>My AMP Page</h1>
}

export default withAmp(Home)
// or
export default withAmp(Home, { hybrid: true })
```

*After*
```js
export default function Home() {
  return <h1>My AMP Page</h1>
}

export const config = {
  amp: true,
  // or
  amp: 'hybrid',
}
```

* Fix { amp: 'hybrid' }

Co-Authored-By: JJ Kasper <jj@jjsweb.site>
2019-06-28 15:04:24 -07:00
..
docs Add export const config support and make withAmp a no-op (#7525) 2019-06-09 17:16:14 -07:00
just-amp Remove withAmp and do not expose isInAmpMode (#7690) 2019-06-28 15:04:24 -07:00
v1.12 Format missed files (#7464) 2019-05-29 18:19:32 -07:00
index.js Remove withAmp and do not expose isInAmpMode (#7690) 2019-06-28 15:04:24 -07:00
info.js Add export const config support and make withAmp a no-op (#7525) 2019-06-09 17:16:14 -07:00
some.js Add export const config support and make withAmp a no-op (#7525) 2019-06-09 17:16:14 -07:00