-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(harvest): Replace router dependency in component by context dep
We want harvest to work without major changes with both a v3 router (Banks and Drive), v4 (use case "Home"), and with a v6 router (use case "MyPapers"). Initially we didn't want to have a backward compatibility with v3 and Banks because we thought it was autonomous and passed everything to harvest. But this is not the case. Moreover we initially thought of using a context to determine which version of the router to use, but this poses problems because there are several "entry points" to Harvest and we are not sure to have the context in all cases. The idea is that we remove the direct dependency on the router via `withRouter` in the components, and replace it with a global `withAdaptiveRouter` dependency that will use either version of the router. Some components were already using this semblance of an approach with the approach with `withMountPointHistory`. So we improved it by adding `location` to this HOC.
- Loading branch information
Showing
9 changed files
with
177 additions
and
99 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
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
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
53 changes: 0 additions & 53 deletions
53
packages/cozy-harvest-lib/src/components/MountPointContext.spec.jsx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.