This repository has been archived by the owner on Sep 7, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 248
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed: navigation now offers a proper scroll behavior.
Not more weird page updates. Closes #285
- Loading branch information
Showing
5 changed files
with
52 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
declare module "react-router-scroll" { | ||
declare var exports: | ||
(shouldUpdateScroll?: () => boolean | Array<number>) => Function; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
declare module "react-router" { | ||
declare interface ReactRouter { | ||
IndexRoute: React.Component; | ||
Link: React.Component; | ||
Redirect: React.Component; | ||
IndexRedirect: React.Component; | ||
Route: React.Component; | ||
Router: React.Component; | ||
browserHistory: any; | ||
useRouterHistory: | ||
(historyFactory: Function) => (options: ?Object) => Object; | ||
match: Function; | ||
RouterContext: React.Component; | ||
createRoutes: (routes: React$Element) => Array<Object>; | ||
formatPattern: (pattern: string, params: Object) => string; | ||
applyRouterMiddleware: Function; | ||
} | ||
declare var exports: ReactRouter; | ||
} | ||
|
||
declare module "react-router/lib/PatternUtils" { | ||
declare var exports: any; | ||
} | ||
|
||
declare module "history/lib/createBrowserHistory" { | ||
declare var exports: any; | ||
} | ||
|
||
export type ReactRouterProps = { | ||
history: Object, | ||
location: Object, | ||
params: Object, | ||
route: Object, | ||
routeParams: Object, | ||
routes: Array<Object>, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters