File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
packages/app/src/app/store/modules/workspace Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 11import { set , when , push } from 'cerebral/operators' ;
22import { state , props } from 'cerebral/tags' ;
33import getTemplate from '@codesandbox/common/lib/templates' ;
4+ import track from '@codesandbox/common/lib/utils/analytics' ;
45import * as actions from './actions' ;
56import { ensureOwnedEditable , closeModal , openModal } from '../../sequences' ;
67import { updateSandboxPackage } from './../editor/sequences' ;
@@ -57,6 +58,27 @@ export const updateSandboxInfo = [
5758 ) ,
5859 {
5960 true : [
61+ // eslint-disable-next-line
62+ ( { state } ) => {
63+ if (
64+ state . get ( 'workspace.project.title' ) &&
65+ state . get (
66+ `editor.sandboxes.${ state . get ( 'editor.currentId' ) } .title`
67+ ) !== state . get ( 'workspace.project.title' )
68+ ) {
69+ track ( 'Sandbox - Update Title' ) ;
70+ }
71+
72+ if (
73+ state . get ( 'workspace.project.description' ) &&
74+ state . get (
75+ `editor.sandboxes.${ state . get ( 'editor.currentId' ) } .description`
76+ ) !== state . get ( 'workspace.project.description' )
77+ ) {
78+ track ( 'Sandbox - Update Description' ) ;
79+ }
80+ } ,
81+
6082 set (
6183 state `editor.sandboxes.${ state `editor.currentId` } .title` ,
6284 state `workspace.project.title`
You can’t perform that action at this time.
0 commit comments