Hi everyone this time I’m gonna share an experience that i got while contributing to SEF (Sustainable Education Foundation) ScholarX project.
What is Sustainable Education Foundation (SEF)?
It’s an organisation which helps local students to connect with industry experts all around the world. They have some awesome projects like Onelive, Academix, ScholarX.
To learn more about the organisation visit sefglobal.org
What is ScholarX ?
ScholarX is a 6-month program for Sri-Lankan undergraduates who would like to get free premium mentoring during their study period. The mentors are from Google, Apple, Microsoft, Harvard University, MIT and from top rated universities around the world.
To learn more about the ScholarX click here.
Recently i was working on a issue in ScholarX project on Github. The issue was to add a new tab named “Completed Programs ” to the home page where the users (mentors/mentees) can see the programs that they completed.
So first i created a new .txs (typescript) file named “CompletedPrograms”, then i created two functions named “getMentoredPrograms” and “getMenteePrograms”. The “getMentoredPrograms” function sends a GET request to the API, and it sends all the programs that user mentors. This request sends all the programs that the user mentored and also currently mentoring. But i want only the completed programs not currently mentoring programs. So I added a small if condition to filter the programs which are in “COMPLETED” state. This gives me all the programs that user mentored and completed.
And the “getMenteePrograms” also does the same thing but this sends a GET request to the API, and it sends all the programs that the user was a mentee. And to filter the programs which are in the “COMPLETED” state I used the same if condition as in “getMentoredPrograms”. And those programs will be displayed in the “Completed Programs”
Now if the user was a mentor or a mentee in a completed program that relevant program will be displayed on the “Completed Programs” tab.
Thank you for reading, hope to share more experiences that i got from contributing to open source projects, So stay tuned 🙃.
Find the Github PR link here.