mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-06 07:47:04 +00:00
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:
Vendored
+1
@@ -4,6 +4,7 @@ import { RouterProps } from "./router";
|
||||
|
||||
export interface AppComponentProps {
|
||||
Component: React.ComponentType<any>;
|
||||
router: RouterProps;
|
||||
pageProps: any;
|
||||
}
|
||||
|
||||
|
||||
@@ -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} />
|
||||
|
||||
Reference in New Issue
Block a user