File tree Expand file tree Collapse file tree 2 files changed +21
-22
lines changed
pages/Sandbox/Editor/Workspace/items/GitHub Expand file tree Collapse file tree 2 files changed +21
-22
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ type State = {
1919 authToken : string ;
2020 error : string ;
2121 contributors : string [ ] ;
22- user : CurrentUser ;
22+ user : CurrentUser | null ;
2323 connected : boolean ;
2424 notifications : Notification [ ] ;
2525 isLoadingCLI : boolean ;
Original file line number Diff line number Diff line change @@ -17,9 +17,7 @@ export const GitHub: FunctionComponent = () => {
1717 currentSandbox : { originalGit, owned } ,
1818 } ,
1919 isLoggedIn,
20- user : {
21- integrations : { github } ,
22- } ,
20+ user,
2321 } ,
2422 } = useOvermind ( ) ;
2523 const showPlaceHolder = ! owned || ! isLoggedIn ;
@@ -37,32 +35,33 @@ export const GitHub: FunctionComponent = () => {
3735 return < More message = { message } id = "github" /> ;
3836 }
3937
40- return github ? ( // eslint-disable-line
41- originalGit ? (
38+ if ( ! user . integrations . github ) {
39+ return (
4240 < >
43- < Git />
41+ < Description >
42+ You can create commits and open pull requests if you add GitHub to
43+ your integrations.
44+ </ Description >
4445
45- < WorkspaceItem title = "Export to GitHub" >
46- < CreateRepo />
47- </ WorkspaceItem >
46+ < div style = { { margin : '1rem' } } >
47+ < GithubIntegration small />
48+ </ div >
4849 </ >
49- ) : (
50- < >
51- < Description > Export your sandbox to GitHub.</ Description >
50+ ) ;
51+ }
52+ return originalGit ? (
53+ < >
54+ < Git />
5255
56+ < WorkspaceItem title = "Export to GitHub" >
5357 < CreateRepo />
54- </ >
55- )
58+ </ WorkspaceItem >
59+ </ >
5660 ) : (
5761 < >
58- < Description >
59- You can create commits and open pull requests if you add GitHub to your
60- integrations.
61- </ Description >
62+ < Description > Export your sandbox to GitHub.</ Description >
6263
63- < div style = { { margin : '1rem' } } >
64- < GithubIntegration small />
65- </ div >
64+ < CreateRepo />
6665 </ >
6766 ) ;
6867} ;
You can’t perform that action at this time.
0 commit comments