From 25726ec0a133679d145a1164955cc60abf8b1b63 Mon Sep 17 00:00:00 2001 From: Maham Akif Date: Mon, 5 Aug 2024 13:59:42 +0500 Subject: [PATCH] feat: show video section to learners with active subscription --- src/components/search/SearchPage.jsx | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/components/search/SearchPage.jsx b/src/components/search/SearchPage.jsx index 03eb12337..05ef2190e 100644 --- a/src/components/search/SearchPage.jsx +++ b/src/components/search/SearchPage.jsx @@ -2,15 +2,30 @@ import React from 'react'; import { SearchData } from '@edx/frontend-enterprise-catalog-search'; import { useIntl } from '@edx/frontend-platform/i18n'; +import { + useSubscriptions, +} from '../app/data'; +import { LICENSE_STATUS } from '../enterprise-user-subsidy/data/constants'; import Search from './Search'; import { SEARCH_TRACKING_NAME } from './constants'; import { getSearchFacetFilters } from './utils'; +import { features } from '../../config'; const SearchPage = () => { const intl = useIntl(); + const { data: { subscriptionLicense } } = useSubscriptions(); + const hasActivatedAndCurrentSubscription = ( + subscriptionLicense?.status === LICENSE_STATUS.ACTIVATED + && subscriptionLicense?.subscriptionPlan?.isCurrent + ); + return ( - + );