rsnext/test/integration/serverless/pages/dr/[slug].js
Joe Haddad 0208356f67
Temporary: SPR: Use Group Index Mapping (#9089)
This pull request is a temporary addition that uses the `x-now-route-params` header in serverless.

This header returns the regex groups with indexes, not their named variants.
As a result, we must use the getRouteMatcher utility to reverse this into Next.js' expected names.

Since this got complex, I've added a test for it. We should probably remove this behavior sooner than later.
2019-10-15 16:30:10 -04:00

5 lines
147 B
JavaScript

const SlugPage = ({ query }) => <div>{JSON.stringify(query)}</div>
SlugPage.getInitialProps = ({ query }) => ({ query })
export default SlugPage