File tree Expand file tree Collapse file tree 1 file changed +16
-7
lines changed
packages/app/src/app/pages/Sandbox/Editor/Workspace/items/Deployment/Netlify/SiteInfo/Actions/VisitSiteButton Expand file tree Collapse file tree 1 file changed +16
-7
lines changed Original file line number Diff line number Diff line change 1- import { inject , hooksObserver } from 'app/componentConnectors ' ;
2- import React from 'react' ;
1+ import { useOvermind } from 'app/overmind ' ;
2+ import React , { FunctionComponent } from 'react' ;
33import LinkIcon from 'react-icons/lib/fa/external-link' ;
44import Cogs from 'react-icons/lib/fa/cogs' ;
55
66import { Link } from '../../../../elements' ;
77
8- export const VisitSiteButton = inject ( 'store' ) (
9- hooksObserver ( ( { store : { deployment : { building, netlifySite } } } ) => (
10- < Link disabled = { building } href = { netlifySite . url } >
8+ export const VisitSiteButton : FunctionComponent = ( ) => {
9+ const {
10+ state : {
11+ deployment : {
12+ building,
13+ netlifySite : { url } ,
14+ } ,
15+ } ,
16+ } = useOvermind ( ) ;
17+
18+ return (
19+ < Link disabled = { building } href = { url } >
1120 { building ? (
1221 < >
1322 < Cogs /> Building...
@@ -18,5 +27,5 @@ export const VisitSiteButton = inject('store')(
1827 </ >
1928 ) }
2029 </ Link >
21- ) )
22- ) ;
30+ ) ;
31+ } ;
You can’t perform that action at this time.
0 commit comments