Skip to content

Commit 9c1e9ae

Browse files
committed
tidy
1 parent 6c1cb37 commit 9c1e9ae

1 file changed

Lines changed: 12 additions & 27 deletions

File tree

src/app/[locale]/account/profile/cohort-discovery-request/components/NhsSdeAccessStepper/NhsSdeAccessStepper.tsx

Lines changed: 12 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -98,32 +98,17 @@ const NhsSdeAccessStepper = () => {
9898
return STEP_STATE.PENDING;
9999
};
100100

101-
const badge =
102-
cdsApproved && approvalRequested
103-
? {
104-
label: t("badgePending"),
105-
bg: colors.grey600,
106-
fg: colors.white,
107-
}
108-
: cdsApproved && (inProcess || (applied && !nhs))
109-
? {
110-
label: t("badgeAwaitingAction"),
111-
bg: colors.orange,
112-
fg: colors.white,
113-
}
114-
: cdsApproved && isApproved
115-
? {
116-
label: capitalise(nhs),
117-
bg: colors.green400,
118-
fg: colors.white,
119-
}
120-
: cdsApproved && isResolvedNeg
121-
? {
122-
label: capitalise(nhs),
123-
bg: colors.red700,
124-
fg: colors.white,
125-
}
126-
: null;
101+
const badge = !cdsApproved
102+
? null
103+
: approvalRequested
104+
? { label: t("badgePending"), bg: colors.grey600 }
105+
: inProcess || (applied && !nhs)
106+
? { label: t("badgeAwaitingAction"), bg: colors.orange }
107+
: isApproved
108+
? { label: capitalise(nhs), bg: colors.green400 }
109+
: isResolvedNeg
110+
? { label: capitalise(nhs), bg: colors.red700 }
111+
: null;
127112

128113
const openConfirmModal = () => {
129114
showModal({
@@ -278,7 +263,7 @@ const NhsSdeAccessStepper = () => {
278263
<Chip
279264
size="small"
280265
label={badge.label}
281-
sx={{ bgcolor: badge.bg, color: badge.fg }}
266+
sx={{ bgcolor: badge.bg, color: colors.white }}
282267
/>
283268
</Box>
284269
)}

0 commit comments

Comments
 (0)