@@ -12,6 +12,7 @@ export const ConfigContext = React.createContext<{
1212 repositorySettings : Record < string , boolean > ;
1313 handleRepositorySelect : ( repository : string , selected : boolean ) => void ;
1414 saveRawSettings : ( settings : Record < string , boolean > | undefined ) => void ;
15+ user ?: { login : string ; avatar_url : string ; url : string } ;
1516} > ( {
1617 octokit : null ,
1718 repositorySettings : { } ,
@@ -35,7 +36,7 @@ function App() {
3536 const octoKit = new GitService (
3637 ( import . meta as any ) . env . VITE_GITHUB_API_URL ||
3738 "https://api.github.com" ,
38- token ,
39+ token
3940 ) ;
4041 octoKit . testAuthentication ( ) . then ( ( user ) => {
4142 if ( user . status !== 200 ) {
@@ -62,8 +63,8 @@ function App() {
6263 new GitService (
6364 ( import . meta as any ) . env . VITE_GITHUB_API_URL ||
6465 "https://api.github.com" ,
65- localStorage . getItem ( "token" ) || "" ,
66- ) ,
66+ localStorage . getItem ( "token" ) || ""
67+ )
6768 ) ;
6869 }
6970 } , [ ] ) ;
@@ -88,7 +89,7 @@ function App() {
8889 return newState ;
8990 } ) ;
9091 } ,
91- [ ] ,
92+ [ ]
9293 ) ;
9394
9495 const saveRawSettings = React . useCallback (
@@ -98,12 +99,12 @@ function App() {
9899 setRepositorySettings ( settings ) ;
99100 localStorage . setItem ( "REPOSITORY_CONFIG" , JSON . stringify ( settings ) ) ;
100101 } ,
101- [ ] ,
102+ [ ]
102103 ) ;
103104
104105 React . useEffect ( ( ) => {
105106 const repositoryConfig = JSON . parse (
106- localStorage . getItem ( "REPOSITORY_CONFIG" ) ?? "{}" ,
107+ localStorage . getItem ( "REPOSITORY_CONFIG" ) ?? "{}"
107108 ) ;
108109 setRepositorySettings ( repositoryConfig ) ;
109110 } , [ ] ) ;
@@ -116,6 +117,7 @@ function App() {
116117 repositorySettings,
117118 handleRepositorySelect,
118119 saveRawSettings,
120+ user,
119121 } }
120122 >
121123 < AppBar
0 commit comments