File tree Expand file tree Collapse file tree 1 file changed +19
-10
lines changed
packages/app/src/app/pages/Sandbox/Editor/Workspace/items/Deployment/Zeit/Deploys/Actions Expand file tree Collapse file tree 1 file changed +19
-10
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 {
2+ ZeitDeployment ,
3+ ZeitDeploymentState ,
4+ } from '@codesandbox/common/lib/types' ;
5+ import React , { FunctionComponent } from 'react' ;
6+
7+ import { useOvermind } from 'app/overmind' ;
38
49import { ButtonContainer } from '../../../elements' ;
510
611import { AliasDeploymentButton } from './AliasDeploymentButton' ;
712import { DeleteDeploymentButton } from './DeleteDeploymentButton' ;
813import { VisitDeploymentButton } from './VisitDeploymentButton' ;
9- import { Deploy } from './types' ;
1014
1115type Props = {
12- deploy : Deploy ;
13- store : any ;
16+ deploy : ZeitDeployment ;
1417} ;
15- export const Actions = inject ( 'store' ) (
16- hooksObserver ( ( { deploy, store : { deployment : { hasAlias } } } : Props ) => (
18+ export const Actions : FunctionComponent < Props > = ( { deploy } ) => {
19+ const {
20+ state : {
21+ deployment : { hasAlias } ,
22+ } ,
23+ } = useOvermind ( ) ;
24+
25+ return (
1726 < ButtonContainer >
1827 < VisitDeploymentButton url = { deploy . url } />
1928
2029 < DeleteDeploymentButton id = { deploy . uid } />
2130
22- { hasAlias && deploy . state === ' READY' ? (
31+ { hasAlias && deploy . state === ZeitDeploymentState . READY ? (
2332 < AliasDeploymentButton deploy = { deploy } />
2433 ) : null }
2534 </ ButtonContainer >
26- ) )
27- ) ;
35+ ) ;
36+ } ;
You can’t perform that action at this time.
0 commit comments