Skip to content

Commit

Permalink
fix: clicking on notification redirecting to correct URL
Browse files Browse the repository at this point in the history
  • Loading branch information
ayesha-waris committed Jul 13, 2023
1 parent 936c871 commit e153aef
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Notifications/NotificationRowItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { useDispatch } from 'react-redux';
import { useIntl } from '@edx/frontend-platform/i18n';
import PropTypes from 'prop-types';
import { Icon } from '@edx/paragon';
import { Link } from 'react-router-dom';
import * as timeago from 'timeago.js';
import { getIconByType } from './utils';
import { markNotificationsAsRead } from './data/thunks';
Expand All @@ -24,12 +23,13 @@ const NotificationRowItem = ({
const { icon: iconComponent, class: iconClass } = getIconByType(type);

return (
<Link
<a
target="_blank"
className="d-flex mb-2 align-items-center text-decoration-none"
to={contentUrl}
href={contentUrl}
onClick={handleMarkAsRead}
data-testid={`notification-${id}`}
rel="noopener noreferrer"
>
<Icon
src={iconComponent}
Expand Down Expand Up @@ -62,7 +62,7 @@ const NotificationRowItem = ({
)}
</div>
</div>
</Link>
</a>
);
};

Expand Down

0 comments on commit e153aef

Please sign in to comment.