File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
app/components/settings/connections Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,12 @@ import { toast } from 'react-toastify';
33import Cookies from 'js-cookie' ;
44import { logStore } from '~/lib/stores/logs' ;
55
6+ interface GitHubUserResponse {
7+ login : string ;
8+ id : number ;
9+ [ key : string ] : any ; // for other properties we don't explicitly need
10+ }
11+
612export default function ConnectionsTab ( ) {
713 const [ githubUsername , setGithubUsername ] = useState ( Cookies . get ( 'githubUsername' ) || '' ) ;
814 const [ githubToken , setGithubToken ] = useState ( Cookies . get ( 'githubToken' ) || '' ) ;
@@ -26,7 +32,7 @@ export default function ConnectionsTab() {
2632 } ) ;
2733
2834 if ( response . ok ) {
29- const data = await response . json ( ) ;
35+ const data = ( await response . json ( ) ) as GitHubUserResponse ;
3036 if ( data . login === githubUsername ) {
3137 setIsConnected ( true ) ;
3238 return true ;
You can’t perform that action at this time.
0 commit comments