File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
apps/learner-web-app/src/app/landing Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ export default function LandingPage() {
4242 const router = useRouter ( ) ;
4343 const { t } = useTranslation ( ) ;
4444 const [ programs , setPrograms ] = useState < Program [ ] > ( [ ] ) ;
45+ const [ ssoPrograms , setSsoPrograms ] = useState < Program [ ] > ( [ ] ) ;
4546 const [ loading , setLoading ] = useState ( true ) ;
4647
4748 useEffect ( ( ) => {
@@ -55,6 +56,11 @@ export default function LandingPage() {
5556 // program?.params?.uiConfig?.sso?.length > 0
5657 ) ;
5758 setPrograms ( visiblePrograms || [ ] ) ;
59+ const ssoProgramsData = programsData ?. filter (
60+ ( program : any ) =>
61+ program ?. params ?. uiConfig ?. sso ?. length > 0
62+ ) ;
63+ setSsoPrograms ( ssoProgramsData || [ ] ) ;
5864 } catch ( error ) {
5965 console . error ( 'Failed to fetch programs:' , error ) ;
6066 } finally {
@@ -87,7 +93,7 @@ export default function LandingPage() {
8793 } ;
8894
8995 const handlePragyanpath = ( ) => {
90- const program = programs . find ( ( p ) =>
96+ const program = ssoPrograms . find ( ( p ) =>
9197 p . name . toLowerCase ( ) . includes ( 'pragyanpath' )
9298 ) ;
9399 if ( program ) {
You can’t perform that action at this time.
0 commit comments