-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MGDCTRS-1926 chore: migrate useAlert usage
This change introduces a local useAlert hook to replace the implementation from app-services-ui-shared. In federated mode this hook is now connected to the console notification system via frontend-components-notifications, and this component is now a direct dependency. This commit therefore also contains some required initialization code and dependencies such as a redux store and react-redux for frontend-components-notifications. Finally, this commit also changes the routing behavior when saving a configuration change, the user remains in the connector detail/overview page when editing a connector instead of going back to the connector list.
- Loading branch information
Showing
15 changed files
with
443 additions
and
117 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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,18 @@ | ||
import notificationsMiddleware from '@redhat-cloud-services/frontend-components-notifications/notificationsMiddleware'; | ||
import ReducerRegistry from '@redhat-cloud-services/frontend-components-utilities/ReducerRegistry'; | ||
import { getRegistry } from '@redhat-cloud-services/frontend-components-utilities/Registry'; | ||
import promiseMiddleware from 'redux-promise-middleware'; | ||
|
||
let registry: ReducerRegistry<any> | undefined = undefined; | ||
|
||
export function init(...middleware: any) { | ||
if (!registry) { | ||
registry = getRegistry({}, [ | ||
promiseMiddleware, | ||
notificationsMiddleware, | ||
...middleware, | ||
]); | ||
console.log('Using reducer registry: ', registry); | ||
} | ||
return registry; | ||
} |
Oops, something went wrong.