File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ export default function UserPage() {
1717 const username = typeof params . username === 'string' ? params . username : ''
1818
1919 const [ repos , setRepos ] = useState < UserRepoSummary [ ] | null > ( null )
20- const [ scannedUsername , setScannedUsername ] = useState ( '' )
2120 const [ loading , setLoading ] = useState ( true )
2221 const [ error , setError ] = useState < string | null > ( null )
2322
@@ -45,10 +44,7 @@ export default function UserPage() {
4544 if ( ! data || typeof data !== 'object' ) throw new Error ( 'Something went wrong. Try again.' )
4645 if ( 'error' in data ) throw new Error ( data . error )
4746
48- const nextUsername = data . username || username
49- const nextRepos = data . repos
50- setScannedUsername ( nextUsername || username )
51- setRepos ( nextRepos )
47+ setRepos ( data . repos )
5248 } )
5349 . catch ( err => {
5450 if ( err ?. name === 'AbortError' ) return
You can’t perform that action at this time.
0 commit comments