-
Notifications
You must be signed in to change notification settings - Fork 707
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prequel to upgrading to react-router 6 (#6453)
### Description of the change Updates our routing with some preparation for the react-router upgrade. This involved: - Re-writing the class-based PrivateRoute component to use function/hooks, - Refactoring the use of `Route` out of the PrivateRoute component and into the routes directly, as these need to be top-level for react-router 6 - Renaming PrivateRoute to RequireAuthentication (as it no longer generates a route). - Updating to simplify tests using react testing library rather than enzyme, including the renderWithProviders util (as per recommended docs) See https://reactrouter.com/en/main/upgrading/v5 ### Benefits One step closer to updating to react-router 6. Starts transition from enzyme to react testinglibrary. ### Applicable issues <!-- Enter any applicable Issues here (You can reference an issue using #) --> - ref #6187 --------- Signed-off-by: Michael Nelson <minelson@vmware.com>
- Loading branch information
1 parent
b5720a2
commit 8c98273
Showing
18 changed files
with
334 additions
and
290 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
78 changes: 0 additions & 78 deletions
78
dashboard/src/components/PrivateRoute/PrivateRoute.test.tsx
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
Oops, something went wrong.