File tree Expand file tree Collapse file tree 4 files changed +26
-2
lines changed
pages/Sandbox/Editor/Content/Header Expand file tree Collapse file tree 4 files changed +26
-2
lines changed Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+ import styled from 'styled-components' ;
3+
4+ const Container = styled . div `
5+ background-color: ${ props => props . theme . background } ;
6+ padding: 1rem;
7+ margin: 0;
8+ color: rgba(255, 255, 255, 0.8);
9+ ` ;
10+
11+ export default class Deploy extends React . PureComponent {
12+ render ( ) {
13+ return < Container > Deploy</ Container > ;
14+ }
15+ }
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ import UserMenu from 'app/containers/UserMenu';
3232import Preferences from 'app/containers/Preferences' ;
3333import NewSandbox from 'app/containers/modals/NewSandbox' ;
3434
35- import deploy from 'app/store/entities/sandboxes/utils/deploy ' ;
35+ import Deployment from 'app/containers/Deployment ' ;
3636
3737import Action from './Action' ;
3838import FeedbackView from './FeedbackView' ;
@@ -109,6 +109,12 @@ export default class Header extends React.PureComponent<Props> {
109109
110110 deploySandbox = ( ) => {
111111 const { sandbox, sandboxActions } = this . props ;
112+
113+ this . props . modalActions . openModal ( {
114+ width : 600 ,
115+ Body : < Deployment /> ,
116+ } ) ;
117+
112118 sandboxActions . deploy ( sandbox . id ) ;
113119 } ;
114120
Original file line number Diff line number Diff line change @@ -359,7 +359,7 @@ export default {
359359 const data = await res . json ( ) ;
360360
361361 if ( ! res . ok ) {
362- dispatch ( notificationActions . addNotification ( data . err . mesage , 'error' ) ) ;
362+ dispatch ( notificationActions . addNotification ( data . err . message , 'error' ) ) ;
363363 return ;
364364 }
365365
Original file line number Diff line number Diff line change @@ -33,6 +33,9 @@ export default async function deploy(
3333 }
3434
3535 apiData . package = JSON . parse ( apiData [ 'package.json' ] ) ;
36+ // We force the sandbox id, so ZEIT will always group the deployments to a
37+ // single sandbox
38+ apiData . package . name = sandbox . id ;
3639 delete apiData [ 'package.json' ] ;
3740
3841 const template = getTemplate ( sandbox . template ) ;
You can’t perform that action at this time.
0 commit comments