-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add paths attribute to per workflow banner settings (#3109)
### Description For the App Notification Banner, user can now specify the paths of a workflow that need to show the banner configured in the appConfiguration banners settings. --------- Co-authored-by: Josh Slaughter <[email protected]>
- Loading branch information
1 parent
331daca
commit 18fcbb2
Showing
5 changed files
with
49 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
// eslint-disable-next-line import/prefer-default-export | ||
export { default as getDisplayName } from "./getDisplayName"; | ||
export { default as findPathMatchList } from "./pathMatching"; |
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,9 @@ | ||
import { matchPath } from "react-router"; | ||
|
||
const findPathMatchList = (locationPathname: string, pathsToMatch: string[]) => { | ||
const pathFound = pathsToMatch?.find((path: string) => matchPath({ path }, locationPathname)); | ||
|
||
return pathFound; | ||
}; | ||
|
||
export default findPathMatchList; |