Skip to content

Commit 9204ca1

Browse files
authored
Merge pull request #2284 from AkshataKatwal16/prod-changes
Issue feat: add story and activity primary category for pos program…
2 parents 10e6451 + 3e8690c commit 9204ca1

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

mfes/content/src/components/Content/List.tsx

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,15 +324,28 @@ export default function Content(props: Readonly<ContentProps>) {
324324
primaryCategory: ['Course'],
325325
});
326326
}
327-
else{
327+
else{
328+
const program = searchParams.get('program');
329+
if(program)
330+
{
331+
resultResponse = await ContentSearch({
332+
...filter,
333+
offset: adjustedOffset,
334+
limit: adjustedLimit,
335+
signal: controller.signal,
336+
isPrimaryCategory: true,
337+
primaryCategory: [
338+
'Learning Resource','Practice Question Set','Activity','Story' ,'Interactive']
339+
}); }
340+
else{
328341

329342
resultResponse = await ContentSearch({
330343
...filter,
331344
offset: adjustedOffset,
332345
limit: adjustedLimit,
333346
signal: controller.signal,
334347
});
335-
348+
}
336349
}
337350

338351

@@ -346,7 +359,7 @@ export default function Content(props: Readonly<ContentProps>) {
346359
offset: adjustedOffset,
347360
limit: adjustedLimit,
348361
signal: controller.signal,
349-
thematicCount: true,
362+
isPrimaryCategory: true,
350363
primaryCategory: [
351364
'Learning Resource','Practice Question Set','Activity','Story' ,'Interactive'],
352365
});

mfes/content/src/services/Search.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export const ContentSearch = async ({
126126
limit = 5,
127127
offset = 0,
128128
noPrimaryCategory = false,
129-
thematicCount = false,
129+
isPrimaryCategory = false,
130130
primaryCategory,
131131
}: {
132132
type: string;
@@ -136,7 +136,7 @@ export const ContentSearch = async ({
136136
offset?: number;
137137
noPrimaryCategory?: boolean;
138138
primaryCategory?: string[];
139-
thematicCount?:boolean;
139+
isPrimaryCategory?:boolean;
140140
}): Promise<ContentResponse> => {
141141
try {
142142
console.log('filters====>' , filters);
@@ -157,7 +157,7 @@ export const ContentSearch = async ({
157157
channel: localStorage.getItem('channelId'),
158158
};
159159
// console.log('filtersObject====>', filtersObject?.primaryCategory);
160-
if(primaryCategory && thematicCount){
160+
if(primaryCategory && isPrimaryCategory){
161161
filtersObject.primaryCategory = primaryCategory;
162162
}
163163
console.log('filtersObject====>' , filters);

0 commit comments

Comments
 (0)