File tree Expand file tree Collapse file tree 6 files changed +37
-17
lines changed
packages/app/src/app/pages Expand file tree Collapse file tree 6 files changed +37
-17
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import {
1010} from './elements' ;
1111
1212type Props = {
13- children : React . ReactChildren ;
13+ children : React . ReactNode ;
1414 title : string ;
1515 keepState ?: boolean ;
1616 disabled ?: boolean ;
Original file line number Diff line number Diff line change 1- import * as React from 'react' ;
2- import { inject , observer } from 'mobx-react' ;
3-
41import VERSION from '@codesandbox/common/lib/version' ;
2+ import { inject , observer } from 'mobx-react' ;
3+ import * as React from 'react' ;
4+ // Fix css prop types in styled-components (see https://github.com/DefinitelyTyped/DefinitelyTyped/issues/31245#issuecomment-463640878)
5+ import { } from 'styled-components/cssprop' ;
56
6- import getWorkspaceItems from 'app/store/modules/workspace/items' ;
77import SocialInfo from 'app/components/SocialInfo' ;
8+ import getWorkspaceItems from 'app/store/modules/workspace/items' ;
89
910import Files from './items/Files' ;
1011import ProjectInfo from './items/ProjectInfo' ;
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import { useSignals, useStore } from 'app/store';
1313import { Error } from './elements' ;
1414
1515type Props = {
16- style : React . CSSProperties ;
16+ style ? : React . CSSProperties ;
1717} ;
1818export const CreateRepo = observer ( ( { style } : Props ) => {
1919 const {
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ export const Git = observer(() => {
4747 } : React . ChangeEvent < HTMLInputElement > ) => subjectChanged ( { subject : value } ) ;
4848 const changeDescription = ( {
4949 target : { value } ,
50- } : React . ChangeEvent < HTMLInputElement > ) =>
50+ } : React . ChangeEvent < HTMLTextAreaElement > ) =>
5151 descriptionChanged ( { description : value } ) ;
5252
5353 const modulesNotSaved = ! isAllModulesSynced ;
Original file line number Diff line number Diff line change @@ -38,7 +38,12 @@ export const GitHub = observer(() => {
3838 )
3939 ) : (
4040 < >
41- < Description margin = { 1 } top = { 0 } >
41+ < Description
42+ css = { `
43+ margin: 1;
44+ top: 0;
45+ ` }
46+ >
4247 You can create commits and open pull requests if you add GitHub to your
4348 integrations.
4449 </ Description >
Original file line number Diff line number Diff line change 1+ import { observer } from 'mobx-react-lite' ;
12import React from 'react' ;
2- import { inject , observer } from 'mobx-react' ;
33import GithubLogo from 'react-icons/lib/go/mark-github' ;
4+
45import Integration from 'app/components/Integration' ;
6+ import { useSignals , useStore } from 'app/store' ;
7+
8+ type Props = {
9+ small ?: boolean ,
10+ } ;
11+
12+ const GithubIntegration = ( { small } : Props ) => {
13+ const { signInGithubClicked, signOutGithubIntegration } = useSignals ( ) ;
14+ const {
15+ isLoadingGithub,
16+ signOutGithubIntegration : {
17+ integrations : { github } ,
18+ } ,
19+ } = useStore ( ) ;
520
6- function GithubIntegration ( { store, signals, small } ) {
721 return (
822 < Integration
9- name = "GitHub"
1023 color = "#4078c0"
1124 description = { small ? 'Commits & PRs' : 'Committing & Pull Requests' }
1225 Icon = { GithubLogo }
26+ loading = { isLoadingGithub }
27+ name = "GitHub"
28+ signIn = { ( ) => signInGithubClicked ( { useExtraScopes : true } ) }
29+ signOut = { signOutGithubIntegration }
1330 small = { small }
14- userInfo = { store . user . integrations . github }
15- signOut = { ( ) => signals . signOutGithubIntegration ( ) }
16- signIn = { ( ) => signals . signInGithubClicked ( { useExtraScopes : true } ) }
17- loading = { store . isLoadingGithub }
31+ userInfo = { github }
1832 />
1933 ) ;
20- }
34+ } ;
2135
22- export default inject ( 'store' , 'signals' ) ( observer ( GithubIntegration ) ) ;
36+ export default observer ( GithubIntegration ) ;
You can’t perform that action at this time.
0 commit comments