Skip to content

Commit 0260bc8

Browse files
fix: remove unused scannedUsername state
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 3f2b2d7 commit 0260bc8

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

src/app/user/[username]/page.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)