Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

#2980 Add Redux Detection #3578

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions assets/images/Svg.js
Expand Up @@ -28,6 +28,7 @@ const svg = {
prettyPrint: require("./prettyPrint.svg"),
react: require("./react.svg"),
"regex-match": require("./regex-match.svg"),
redux: require("./redux.svg"),
resume: require("./resume.svg"),
settings: require("./settings.svg"),
stepIn: require("./stepIn.svg"),
Expand Down
7 changes: 7 additions & 0 deletions assets/images/redux.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions src/utils/frame.js
Expand Up @@ -71,6 +71,10 @@ function isAngular(frame) {
return getFrameUrl(frame).match(/angular/i);
}

function isRedux(frame) {
return getFrameUrl(frame).match(/redux/i);
}

export function getLibraryFromUrl(frame: Frame) {
// @TODO each of these fns calls getFrameUrl, just call it once
// (assuming there's not more complex logic to identify a lib)
Expand Down Expand Up @@ -130,6 +134,10 @@ export function getLibraryFromUrl(frame: Frame) {
if (isAngular(frame)) {
return "Angular";
}

if (isRedux(frame)) {
return "Redux";
}
}

const displayNameMap = {
Expand Down