With this application you can access information about a team from the NBA, NFL, MLB, and EPL. You'll be able to see the latest scores and team information. Also, you'll be able to access the team's website and the team's social media accounts.
This was created to display what I learned from my second unit of my Software Engineering Immersive Course. A fun way of doing this was making a sports app.
- React
- Languages Used: Javascript, CSS, HTML
- EPL: https://www.thesportsdb.com/api/v1/json/1/search_all_teams.php?l=English%20Premier%20League
- NBA: https://www.thesportsdb.com/api/v1/json/1/search_all_teams.php?l=NBA
- NFL: https://www.thesportsdb.com/api/v1/json/1/search_all_teams.php?l=NFL
- MLB: https://www.thesportsdb.com/api/v1/json/1/search_all_teams.php?l=MLB
- Ability to access different leagues such as the NBA, NFL, MLB, and EPL
- Ability to access every team in those leagues
- You'll have access to each team's latest results
- You'll see a team information section for each team
- You'll have access to each team's website, and social media accounts
Resolution: Had to use a conditional in order to access the data that was pulled in.
if (!usLeague) {
return <></>
};
Error: Clicking on the social media icons did not open the correct page. Instead the social media url would be added onto the current page's url. Example below.
Resolution: To fix this, I added "https://" onto to the href
<a href={"https://" + team.strInstagram} target="_blank">