File tree Expand file tree Collapse file tree 1 file changed +18
-8
lines changed
packages/app/src/app/pages/common/Modals/CommitModal Expand file tree Collapse file tree 1 file changed +18
-8
lines changed Original file line number Diff line number Diff line change 1- import React from 'react' ;
2- import { inject , observer } from 'app/componentConnectors' ;
1+ import React , { FunctionComponent } from 'react' ;
2+
33import { GitProgress } from 'app/components/GitProgress' ;
4+ import { useOvermind } from 'app/overmind' ;
5+
6+ const CommitModal : FunctionComponent = ( ) => {
7+ const {
8+ state : {
9+ editor : {
10+ currentSandbox : { originalGit : git } ,
11+ } ,
12+ git : { commit } ,
13+ user : { username } ,
14+ } ,
15+ } = useOvermind ( ) ;
416
5- function CommitModal ( { store } ) {
6- const git = store . editor . currentSandbox . originalGit ;
7- const { commit } = store . git ;
817 let message ;
918
1019 if ( commit ) {
1120 if ( commit . newBranch ) {
1221 const newUrl = `https://github.com/${ git . username } /${ git . repo } /compare/${
1322 git . branch
14- } ...${ store . user . username } :${ commit . newBranch } ?expand=1`;
23+ } ...${ username } :${ commit . newBranch } ?expand=1`;
24+
1525 message = (
1626 < div >
1727 There was a merge conflict while committing, you can open a PR
@@ -36,6 +46,6 @@ function CommitModal({ store }) {
3646 }
3747
3848 return < GitProgress result = { message } message = "Creating Commit..." /> ;
39- }
49+ } ;
4050
41- export default inject ( 'store' ) ( observer ( CommitModal ) ) ;
51+ export default CommitModal ;
You can’t perform that action at this time.
0 commit comments