Skip to content

Commit 39d2a74

Browse files
committed
TCA-986 - completed modal & enrolled modal: optimize bg, move cert to completed if reqs are met
1 parent 7332737 commit 39d2a74

File tree

15 files changed

+29
-18
lines changed

15 files changed

+29
-18
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export { default as BaseModal } from './BaseModal'
1+
export { default as BaseModal, type BaseModalProps } from './BaseModal'

src-ts/lib/styles/variables/_palette.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ $tc-grad16: linear-gradient(265.38deg, $turq-100 1.99%, $teal-100 98.19%);
198198
$tc-grad17: linear-gradient(265.38deg, #363D8C 1.99%, #723390 98.19%);
199199
$tc-grad18: linear-gradient(84.92deg, #363D8C 2.08%, #723390 97.43%);
200200
$tc-grad19: linear-gradient(83.58deg, #7B21A7 2.28%, #1974AD 97.67%);
201+
$tc-grad20: linear-gradient(30deg, #05456D 2.12%, #0A7AC0 97.43%);
201202

202203

203204
/* OPACITY */

src-ts/tools/learn/certification-details/enrolled-modal/EnrolledModal.module.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99

1010
.enrolledModal {
1111
color: $tc-white;
12-
background: url(./bg.png) center no-repeat;
12+
background: url(./bg.jpg) center no-repeat, $tc-grad20;
1313

1414
@include ltemd {
15-
background: url(./bg-mobile.png) 0 0 no-repeat;
15+
background: url(./bg-mobile.jpg) 0 0 no-repeat, $tc-grad20;
1616
background-size: cover;
1717
}
1818

14.5 KB
Loading
Binary file not shown.
6.54 KB
Loading
-74.2 KB
Binary file not shown.

src-ts/tools/learn/certification-details/enrollment-page/EnrollmentPage.tsx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,13 @@ import {
2020
} from '../../../../lib'
2121
import {
2222
enrollTCACertificationAsync,
23+
TCACertificationCheckCompleted,
24+
TCACertificationProgress,
2325
TCACertificationProgressProviderData,
2426
TCACertificationProviderData,
2527
useGetTCACertification,
2628
useGetTCACertificationProgress,
29+
useTCACertificationCheckCompleted,
2730
useTcaCertificationModal,
2831
} from '../../learn-lib'
2932
import { perks } from '../certification-details-modal/certif-details-content/data'
@@ -66,8 +69,17 @@ const EnrollmentPage: FC<{}> = () => {
6669

6770
const ready: boolean = profileReady && certificationReady && progressReady && !!profile
6871

72+
const firstResourceProgress: TCACertificationProgress['resourceProgresses'][0] | undefined
73+
= progress?.resourceProgresses?.[0]
74+
75+
const { certification: tcaCertificationName }: TCACertificationCheckCompleted = useTCACertificationCheckCompleted(
76+
firstResourceProgress?.resourceProgressType ?? '',
77+
firstResourceProgress?.resourceProgressId ?? '',
78+
{ enabled: !!firstResourceProgress?.resourceProgressType },
79+
)
80+
6981
const tcaCertificationCompletedModal: ReactNode = useTcaCertificationModal(
70-
progress ? certification.dashedName : undefined,
82+
tcaCertificationName,
7183
navToCertificationDetails,
7284
)
7385

src-ts/tools/learn/learn-lib/data-providers/tca-certifications-provider/tca-certification-progress/tca-certification-progress.model.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ export interface TCACertificationProgress extends LearnModelBase {
1818
completedAt: null | Date
1919
certificationProgress: number
2020
resourceProgresses: [{
21-
status: UserCertificationProgressStatus,
21+
resourceProgressId: string
22+
resourceProgressType: 'FccCertificationProgress'
2223
fccCertificationProgress: TCAFccCertificationProgress
24+
status: UserCertificationProgressStatus,
2325
}]
2426
userHandle: string
2527
userId: number

src-ts/tools/learn/learn-lib/tca-certification-completed-modal/TCACertificationCompletedModal.module.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
@import '../../../../lib/styles/includes';
22

3-
.completedModal {
3+
.completedModal.completedModal {
44
color: $tc-white;
5-
background: url(./bg.png) center no-repeat;
5+
background: url(./bg.jpg) center no-repeat, $tc-grad20;
66

77
@include ltemd {
8-
background: url(./bg-mobile.png) 0 0 no-repeat;
8+
background: url(./bg-mobile.jpg) 0 0 no-repeat, $tc-grad20;
99
background-size: cover;
1010
}
1111

0 commit comments

Comments
 (0)