File tree Expand file tree Collapse file tree 1 file changed +29
-26
lines changed
packages/app/src/app/pages/Sandbox/Editor/Header/Buttons/ForkButton Expand file tree Collapse file tree 1 file changed +29
-26
lines changed Original file line number Diff line number Diff line change 1- import React from 'react' ;
2- import { hooksObserver , inject } from 'app/componentConnectors' ;
1+ import React , { FunctionComponent } from 'react' ;
2+
3+ import { useOvermind } from 'app/overmind' ;
4+
35import { ProgressButton , ForkIcon } from './elements' ;
46
5- export const ForkButton = inject ( 'store' , 'signals' ) (
6- hooksObserver (
7- ( {
8- signals : {
9- editor : { forkSandboxClicked } ,
10- } ,
11- store : {
12- editor : {
13- isForkingSandbox,
14- currentSandbox : { owned } ,
15- } ,
7+ export const ForkButton : FunctionComponent = ( ) => {
8+ const {
9+ actions : {
10+ editor : { forkSandboxClicked } ,
11+ } ,
12+ state : {
13+ editor : {
14+ isForkingSandbox,
15+ currentSandbox : { owned } ,
1616 } ,
17- } ) => (
18- < ProgressButton
19- onClick = { forkSandboxClicked }
20- secondary = { owned }
21- loading = { isForkingSandbox }
22- small
23- >
24- < ForkIcon />
25- { isForkingSandbox ? 'Forking...' : 'Fork' }
26- </ ProgressButton >
27- )
28- )
29- ) ;
17+ } ,
18+ } = useOvermind ( ) ;
19+
20+ return (
21+ < ProgressButton
22+ loading = { isForkingSandbox }
23+ onClick = { forkSandboxClicked }
24+ secondary = { owned }
25+ small
26+ >
27+ < ForkIcon />
28+
29+ { isForkingSandbox ? 'Forking...' : 'Fork' }
30+ </ ProgressButton >
31+ ) ;
32+ } ;
You can’t perform that action at this time.
0 commit comments