File tree Expand file tree Collapse file tree 1 file changed +24
-24
lines changed
packages/app/src/app/pages/Sandbox/Editor/Header/Buttons/ShareButton Expand file tree Collapse file tree 1 file changed +24
-24
lines changed Original file line number Diff line number Diff line change 1- import React from 'react' ;
2- import { inject , hooksObserver } from 'app/componentConnectors' ;
1+ import React , { FunctionComponent } from 'react' ;
2+
3+ import { useOvermind } from 'app/overmind' ;
4+
35import { Button , ShareIcon } from './elements' ;
46
5- export const ShareButton = inject ( 'store' , 'signals' ) (
6- hooksObserver (
7- ( {
8- signals : { modalOpened } ,
9- store : {
10- editor : {
11- currentSandbox : { owned } ,
12- } ,
7+ export const ShareButton : FunctionComponent = ( ) => {
8+ const {
9+ actions : { modalOpened } ,
10+ state : {
11+ editor : {
12+ currentSandbox : { owned } ,
1313 } ,
14- } ) => (
15- < Button
16- onClick = { ( ) => {
17- modalOpened ( { modal : 'share' } ) ;
18- } }
19- secondary = { ! owned }
20- small
21- >
22- < ShareIcon / >
23- Share
24- </ Button >
25- )
26- )
27- ) ;
14+ } ,
15+ } = useOvermind ( ) ;
16+
17+ return (
18+ < Button
19+ onClick = { ( ) => modalOpened ( { modal : 'share' } ) }
20+ secondary = { ! owned }
21+ small
22+ >
23+ < ShareIcon />
24+ Share
25+ </ Button >
26+ ) ;
27+ } ;
You can’t perform that action at this time.
0 commit comments