()
| 73 | }; |
| 74 | |
| 75 | const getRepo = async () => { |
| 76 | try { |
| 77 | const response = await fetch( |
| 78 | "https://api.github.com/users/TechSpiritSS/repos" |
| 79 | ) |
| 80 | .then((response) => response.json()) |
| 81 | .then((data) => { |
| 82 | userRepos.push(data); |
| 83 | }); |
| 84 | } catch (error) { |
| 85 | console.log(error); |
| 86 | userRepos.push([ |
| 87 | { |
| 88 | name: "__network_error", |
| 89 | description: "__kindly check internet connection", |
| 90 | html_url: "", |
| 91 | }, |
| 92 | ]); |
| 93 | } |
| 94 | }; |
| 95 | |
| 96 | export { |
| 97 | //functions exported |