Skip to content

Commit b004565

Browse files
authored
Merge pull request #395 from topcoder-platform/TCA-407_my-learning-filtering
TCA-407 TCA-61 my learning filtering issue -> dev
2 parents b628f11 + 189009f commit b004565

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src-ts/tools/learn/my-learning/completed-tab/CompletedTab.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ const CompletedTab: FC<CompletedTabProps> = (props: CompletedTabProps) => {
2727
props.certifications
2828
)
2929

30+
const disableFilters: boolean = props.certifications.length < 1
3031
const hasCertifications: boolean = certifications.length >= 1
3132

3233
const renderPlaceholder: () => ReactNode = () => (
@@ -60,7 +61,7 @@ const CompletedTab: FC<CompletedTabProps> = (props: CompletedTabProps) => {
6061
sortOptions={sortOptions.completed}
6162
onSortChange={handleSortChange}
6263
onCategoryChange={handleCategoryChange}
63-
disableFilters={!hasCertifications}
64+
disableFilters={disableFilters}
6465
>
6566
<div className={styles['cards-wrap']}>
6667
{renderCertificationsList()}

src-ts/tools/learn/my-learning/in-progress-tab/InProgressTab.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ const InProgressTab: FC<InProgressTabProps> = (props: InProgressTabProps) => {
2727
props.certifications
2828
)
2929

30+
const disableFilters: boolean = props.certifications.length < 1
3031
const hasCertifications: boolean = certifications.length >= 1
3132

3233
const renderPlaceholder: () => ReactNode = () => (
@@ -63,7 +64,7 @@ const InProgressTab: FC<InProgressTabProps> = (props: InProgressTabProps) => {
6364
sortOptions={sortOptions.inProgress}
6465
onSortChange={handleSortChange}
6566
onCategoryChange={handleCategoryChange}
66-
disableFilters={!hasCertifications}
67+
disableFilters={disableFilters}
6768
>
6869
<div className={styles.wrap}>
6970
{renderCertificationsList()}

0 commit comments

Comments
 (0)