Add router prop to AppComponentProps

`router` also needs to be set when rendering <App /> manually
(e.g. with Apollo SSR)
This commit is contained in:
Jeremy Stucki
2018-06-26 10:16:20 +02:00
parent 87f0d482eb
commit 31bc8eeac3
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -4,6 +4,7 @@ import { RouterProps } from "./router";
export interface AppComponentProps {
Component: React.ComponentType<any>;
router: RouterProps;
pageProps: any;
}
+1 -1
View File
@@ -17,7 +17,7 @@ class TestApp extends App<NextComponentProps> {
}
render() {
const { Component, pageProps } = this.props;
const { Component, router, pageProps } = this.props;
return (
<Container>
<Component {...pageProps} />