Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
142 changes: 48 additions & 94 deletions ui/apps/platform/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 3 additions & 6 deletions ui/apps/platform/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"@patternfly/react-user-feedback": "^5.0.0",
"axios": "^1.7.7",
"computed-style-to-inline-style": "^3.0.0",
"connected-react-router": "^6.9.2",
"core-js": "^3.39.0",
"d3-axis": "^1.0.12",
"d3-brush": "^3.0.0",
Expand All @@ -42,7 +41,7 @@
"formik": "^2.2.9",
"framer-motion": "^10.0.0",
"graphql": "^16.8.1",
"history": "^4.9.0",
"history": "^5.3.0",
"html2canvas": "1.0.0-rc.7",
"initials": "^3.1.2",
"js-base64": "^3.7.2",
Expand Down Expand Up @@ -74,7 +73,7 @@
"react-popper": "0.9.0",
"react-redux": "^7.2.6",
"react-responsive": "^9.0.2",
"react-router-dom": "^5.3.4",
"react-router-dom": "^6.28.0",
"react-router-hash-link": "^2.4.3",
"react-select": "^2.0.0",
"react-spinners": "^0.10.4",
Expand All @@ -85,6 +84,7 @@
"react-vis": "^1.12.1",
"redoc": "^2.0.0",
"redux": "^4.1.2",
"redux-first-history": "^5.2.0",
"redux-form": "^8.3.7",
"redux-saga": "^0.16.0",
"redux-thunk": "^2.4.1",
Expand Down Expand Up @@ -182,9 +182,6 @@
"@typescript-eslint/parser": "^8.17.0",
"autoprefixer": "10.4.5",
"babel-jest": "^29.7.0",
"connected-react-router": {
"react": "^18.0.0"
},
"eslint": "^9.16.0",
"eslint-plugin-jest": "^28.9.0",
"eslint-plugin-jest-dom": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ function LinkShim({
href,
...rest
}: AnchorHTMLAttributes<HTMLAnchorElement>): ReactElement {
if (!href) {
return <></>;
}
return (
<Link {...rest} to={href}>
{children}
Expand Down
9 changes: 5 additions & 4 deletions ui/apps/platform/src/Components/RelatedEntity.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
import React, { useContext } from 'react';
import PropTypes from 'prop-types';
import { useHistory, useLocation, useRouteMatch } from 'react-router-dom';
import { useLocation, useNavigate } from 'react-router-dom';

import Widget from 'Components/Widget';
import EntityIcon from 'Components/EntityIcon';
import { newWorkflowCases } from 'constants/useCaseTypes';
import workflowStateContext from 'Containers/workflowStateContext';
import useWorkflowMatch from 'hooks/useWorkflowMatch';
import hexagonal from 'images/side-panel-icons/hexagonal.svg';
import URLService from 'utils/URLService';

// @TODO We should try to use this component for Compliance as well
const RelatedEntity = ({ name, entityType, entityId, value, ...rest }) => {
const history = useHistory();
const navigate = useNavigate();
const location = useLocation();
const match = useRouteMatch();
const match = useWorkflowMatch();
const workflowState = useContext(workflowStateContext);

function onClick() {
Expand All @@ -28,7 +29,7 @@ const RelatedEntity = ({ name, entityType, entityId, value, ...rest }) => {
} else {
url = URLService.getURL(match, location).push(entityType, entityId).url();
}
history.push(url);
navigate(url);
}

const content = (
Expand Down
9 changes: 5 additions & 4 deletions ui/apps/platform/src/Components/RelatedEntityListCount.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
import React, { useContext } from 'react';
import { useHistory, useLocation, useRouteMatch } from 'react-router-dom';
import { useLocation, useNavigate } from 'react-router-dom';
import PropTypes from 'prop-types';

import Widget from 'Components/Widget';
import { newWorkflowCases } from 'constants/useCaseTypes';
import workflowStateContext from 'Containers/workflowStateContext';
import useWorkflowMatch from 'hooks/useWorkflowMatch';
import URLService from 'utils/URLService';

// @TODO We should try to use this component for Compliance as well
const RelatedEntityListCount = ({ name, value, entityType, ...rest }) => {
const history = useHistory();
const navigate = useNavigate();
const location = useLocation();
const match = useRouteMatch();
const match = useWorkflowMatch();
const workflowState = useContext(workflowStateContext);

function onClick() {
Expand All @@ -23,7 +24,7 @@ const RelatedEntityListCount = ({ name, value, entityType, ...rest }) => {
} else {
url = URLService.getURL(match, location).push(entityType).url();
}
history.push(url);
navigate(url);
}

const content = <div className="text-6xl">{value}</div>;
Expand Down
Loading
Loading