File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import "github-repo-display-react/dist/index.css"
6
6
const App = ( ) => {
7
7
return (
8
8
< div className = 'repos' >
9
- < GithubRepoDisplay userName = 'msmfa' />
9
+ < GithubRepoDisplay numOfrepos = { 5 } userName = 'msmfa' />
10
10
</ div >
11
11
)
12
12
}
Original file line number Diff line number Diff line change @@ -9,21 +9,21 @@ const fetchApiData = async (username) => {
9
9
return response . data
10
10
}
11
11
12
- function GetRepoData ( { userName } ) {
12
+ function GetRepoData ( { userName, numOfrepos } ) {
13
13
const [ repoData , setRepoData ] = useState ( [ ] )
14
14
15
15
useEffect ( ( ) => {
16
16
fetchApiData ( userName ) . then ( setRepoData )
17
17
} , [ userName ] )
18
18
19
- return < DisplaySortedRepoData numOfrepos = { 3 } repoData = { repoData } />
19
+ return < DisplaySortedRepoData numOfrepos = { numOfrepos } repoData = { repoData } />
20
20
}
21
21
22
- export const GithubRepoDisplay = ( { userName } ) => {
22
+ export const GithubRepoDisplay = ( { userName, numOfrepos } ) => {
23
23
return (
24
24
< div className = { styles . test } >
25
25
{ " " }
26
- < GetRepoData userName = { userName } />
26
+ < GetRepoData numOfrepos = { numOfrepos } userName = { userName } />
27
27
</ div >
28
28
)
29
29
}
You can’t perform that action at this time.
0 commit comments