File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed
apps/learner-web-app/src/components
mfes/content/src/components/Content Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,8 @@ const App = ({
7474 useEffect ( ( ) => {
7575 const fetch = async ( ) => {
7676 const response = await fetchContent ( identifier ) ;
77+ setItem ( { content : response } ) ;
78+
7779 const rt = ( await hierarchyAPI ( courseId as string ) ) as any ;
7880 console . log ( 'rt=======>' , rt ) ;
7981 const currentPath =
@@ -117,7 +119,8 @@ const App = ({
117119 console . log ( 'response2=======>' , mimeType ) ;
118120
119121 setMemetype ( mimeType ) ;
120- setItem ( { content : response } ) ;
122+ console . log ( 'setItem=======>' , response ) ;
123+
121124 if ( unitId ) {
122125 const course = await hierarchyAPI ( courseId as string ) ;
123126 const breadcrum = findCourseUnitPath ( {
Original file line number Diff line number Diff line change @@ -214,7 +214,7 @@ const Footer = () => {
214214 textAlign : 'center' ,
215215 } }
216216 >
217- © 2025 Pratham
217+ © { new Date ( ) . getFullYear ( ) } Pratham
218218 </ Typography >
219219 </ Box >
220220 </ Box >
Original file line number Diff line number Diff line change @@ -653,17 +653,20 @@ export default function Content(props: Readonly<ContentProps>) {
653653 } )
654654 ) ;
655655 persistFilters ( localFilters ) ;
656+
657+ const activeLink = window . location . pathname + window . location . search ;
658+
656659 if ( propData ?. handleCardClick ) {
657660 propData . handleCardClick ( content , e , rowNumber ) ;
658661 } else if ( SUPPORTED_MIME_TYPES . includes ( content ?. mimeType ) ) {
659662 router . push (
660663 `${ props ?. _config ?. contentBaseUrl ?? '' } /player/${ content ?. identifier
661- } ?activeLink=${ window . location . pathname + window . location . search } `
664+ } ?activeLink=${ encodeURIComponent ( activeLink ) } `
662665 ) ;
663666 } else {
664667 router . push (
665668 `${ props ?. _config ?. contentBaseUrl ?? '' } /content-details/${ content ?. identifier
666- } ?activeLink=${ window . location . pathname + window . location . search } `
669+ } ?activeLink=${ encodeURIComponent ( activeLink ) } `
667670 ) ;
668671 }
669672 } catch ( error ) {
You can’t perform that action at this time.
0 commit comments