1- import React , { useEffect } from 'react' ;
21import Margin from '@codesandbox/common/lib/components/spacing/Margin' ;
32import { Button } from '@codesandbox/common/lib/components/Button' ;
43import GithubBadge from '@codesandbox/common/lib/components/GithubBadge' ;
54import Input , { TextArea } from '@codesandbox/common/lib/components/Input' ;
65import Notice from '@codesandbox/common/lib/components/Notice' ;
76import { githubRepoUrl } from '@codesandbox/common/lib/utils/url-generator' ;
7+ import React , { ChangeEvent , FunctionComponent , useEffect } from 'react' ;
8+
89import { useOvermind } from 'app/overmind' ;
9- import { WorkspaceSubtitle , WorkspaceInputContainer } from '../../../elements' ;
10+
11+ import { WorkspaceInputContainer , WorkspaceSubtitle } from '../../../elements' ;
12+
1013import { Container , Buttons , ErrorMessage , NoChanges } from './elements' ;
1114import { TotalChanges } from './TotalChanges' ;
1215
1316const hasWriteAccess = ( rights : string ) => [ 'admin' , 'write' ] . includes ( rights ) ;
1417
15- export const Git = ( ) => {
18+ export const Git : FunctionComponent = ( ) => {
1619 const {
17- state : {
18- editor : {
19- currentSandbox : { originalGit } ,
20- isAllModulesSynced,
21- } ,
22- git : { description, isFetching, originalGitChanges : gitChanges , subject } ,
23- } ,
2420 actions : {
2521 git : {
2622 createCommitClicked,
@@ -30,6 +26,13 @@ export const Git = () => {
3026 subjectChanged,
3127 } ,
3228 } ,
29+ state : {
30+ editor : {
31+ currentSandbox : { originalGit } ,
32+ isAllModulesSynced,
33+ } ,
34+ git : { description, isFetching, originalGitChanges : gitChanges , subject } ,
35+ } ,
3336 } = useOvermind ( ) ;
3437
3538 useEffect ( ( ) => {
@@ -38,14 +41,12 @@ export const Git = () => {
3841
3942 const createCommit = ( ) => createCommitClicked ( ) ;
4043 const createPR = ( ) => createPrClicked ( ) ;
41-
4244 const changeSubject = ( {
4345 target : { value } ,
44- } : React . ChangeEvent < HTMLInputElement > ) => subjectChanged ( { subject : value } ) ;
45-
46+ } : ChangeEvent < HTMLInputElement > ) => subjectChanged ( { subject : value } ) ;
4647 const changeDescription = ( {
4748 target : { value } ,
48- } : React . ChangeEvent < HTMLTextAreaElement > ) =>
49+ } : ChangeEvent < HTMLTextAreaElement > ) =>
4950 descriptionChanged ( { description : value } ) ;
5051
5152 const modulesNotSaved = ! isAllModulesSynced ;
0 commit comments