Skip to content

Commit

Permalink
Update getRedirectLink again to cover users without rated disabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
williamphelps13 committed Jan 31, 2025
1 parent b65a0e0 commit 669e9a2
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import PropTypes from 'prop-types';

import {
capitalizeEachWord,
DISABILITY_SHARED_CONFIG,
hasRatedDisabilities,
isClaimingIncrease,
isClaimingNew,
isDisabilityPtsd,
Expand Down Expand Up @@ -33,12 +35,20 @@ const mapDisabilityName = (disabilityName, formData, index) => {
return <li key={`"${disabilityName}-${index}"`}>{disabilityName}</li>;
};

const getRedirectLink = () => {
const getRedirectLink = formData => {
let destinationPath;

if (hasRatedDisabilities(formData)) {
destinationPath = 'claim-type';
} else {
destinationPath = DISABILITY_SHARED_CONFIG.addDisabilities.path;
}

Check failure on line 45 in src/applications/disability-benefits/all-claims/content/summaryOfDisabilities.jsx

View workflow job for this annotation

GitHub Actions / Linting (Files Changed)

src/applications/disability-benefits/all-claims/content/summaryOfDisabilities.jsx:45:4:Parsing error: Unexpected token (45:4)

return (
<Link
aria-label="go back and add any missing disabilities"
to={{
pathname: 'claim-type',
pathname: destinationPath,
search: '?redirect',
}}
>
Expand Down

0 comments on commit 669e9a2

Please sign in to comment.