-
-
Notifications
You must be signed in to change notification settings - Fork 202
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(data): add repo data again data was removed due to merge conflicts, added it back * fixes types * adds repo count * replace useRepositoriesList
- Loading branch information
Showing
8 changed files
with
43 additions
and
232 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,201 +1,14 @@ | ||
import useSWR from "swr"; | ||
|
||
const useRepositoriesList = () => { | ||
const repositoriesList = [ | ||
{ | ||
title: "freecodecamp", | ||
stars: 100, | ||
forks: 20, | ||
persons: 40, | ||
unknown: 5 | ||
}, | ||
{ | ||
title: "free-programming-books", | ||
stars: 60, | ||
forks: 10, | ||
persons: 20, | ||
unknown: 5 | ||
}, | ||
{ | ||
title: "material-ui", | ||
stars: 20, | ||
forks: 30, | ||
persons: 10, | ||
unknown: 2 | ||
}, | ||
{ | ||
title: "react", | ||
stars: 100, | ||
forks: 20, | ||
persons: 30, | ||
unknown: 10 | ||
}, | ||
{ | ||
title: "java-design-patterns", | ||
stars: 20, | ||
forks: 14, | ||
persons: 10, | ||
unknown: 0 | ||
},{ | ||
title: "freecodecamp", | ||
stars: 100, | ||
forks: 20, | ||
persons: 40, | ||
unknown: 5 | ||
}, | ||
{ | ||
title: "free-programming-books", | ||
stars: 60, | ||
forks: 10, | ||
persons: 20, | ||
unknown: 5 | ||
}, | ||
{ | ||
title: "material-ui", | ||
stars: 20, | ||
forks: 30, | ||
persons: 10, | ||
unknown: 2 | ||
}, | ||
{ | ||
title: "react", | ||
stars: 100, | ||
forks: 20, | ||
persons: 30, | ||
unknown: 10 | ||
}, | ||
{ | ||
title: "java-design-patterns", | ||
stars: 20, | ||
forks: 14, | ||
persons: 10, | ||
unknown: 0 | ||
},{ | ||
title: "freecodecamp", | ||
stars: 100, | ||
forks: 20, | ||
persons: 40, | ||
unknown: 5 | ||
}, | ||
{ | ||
title: "free-programming-books", | ||
stars: 60, | ||
forks: 10, | ||
persons: 20, | ||
unknown: 5 | ||
}, | ||
{ | ||
title: "material-ui", | ||
stars: 20, | ||
forks: 30, | ||
persons: 10, | ||
unknown: 2 | ||
}, | ||
{ | ||
title: "react", | ||
stars: 100, | ||
forks: 20, | ||
persons: 30, | ||
unknown: 10 | ||
}, | ||
{ | ||
title: "java-design-patterns", | ||
stars: 20, | ||
forks: 14, | ||
persons: 10, | ||
unknown: 0 | ||
},{ | ||
title: "freecodecamp", | ||
stars: 100, | ||
forks: 20, | ||
persons: 40, | ||
unknown: 5 | ||
}, | ||
{ | ||
title: "free-programming-books", | ||
stars: 60, | ||
forks: 10, | ||
persons: 20, | ||
unknown: 5 | ||
}, | ||
{ | ||
title: "material-ui", | ||
stars: 20, | ||
forks: 30, | ||
persons: 10, | ||
unknown: 2 | ||
}, | ||
{ | ||
title: "react", | ||
stars: 100, | ||
forks: 20, | ||
persons: 30, | ||
unknown: 10 | ||
}, | ||
{ | ||
title: "java-design-patterns", | ||
stars: 20, | ||
forks: 14, | ||
persons: 10, | ||
unknown: 0 | ||
},{ | ||
title: "freecodecamp", | ||
stars: 100, | ||
forks: 20, | ||
persons: 40, | ||
unknown: 5 | ||
}, | ||
{ | ||
title: "free-programming-books", | ||
stars: 60, | ||
forks: 10, | ||
persons: 20, | ||
unknown: 5 | ||
}, | ||
{ | ||
title: "material-ui", | ||
stars: 20, | ||
forks: 30, | ||
persons: 10, | ||
unknown: 2 | ||
}, | ||
{ | ||
title: "react", | ||
stars: 100, | ||
forks: 20, | ||
persons: 30, | ||
unknown: 10 | ||
}, | ||
{ | ||
title: "java-design-patterns", | ||
stars: 20, | ||
forks: 14, | ||
persons: 10, | ||
unknown: 0 | ||
},{ | ||
title: "freecodecamp", | ||
stars: 100, | ||
forks: 20, | ||
persons: 40, | ||
unknown: 5 | ||
}, | ||
{ | ||
title: "free-programming-books", | ||
stars: 60, | ||
forks: 10, | ||
persons: 20, | ||
unknown: 5 | ||
}, | ||
{ | ||
title: "material-ui", | ||
stars: 20, | ||
forks: 30, | ||
persons: 10, | ||
unknown: 2 | ||
} | ||
]; | ||
const { data, error, mutate } = useSWR("repos/list"); | ||
|
||
return { | ||
repositoriesList | ||
repoList: data || {data: []}, | ||
isLoading: !error && !data, | ||
isError: !!error, | ||
mutate | ||
}; | ||
}; | ||
|
||
export default useRepositoriesList; | ||
export {useRepositoriesList}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters