Skip to content

Commit bdc8188

Browse files
committed
Mark updated title
1 parent db56248 commit bdc8188

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

packages/app/src/app/store/modules/workspace/sequences.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { set, when, push } from 'cerebral/operators';
22
import { state, props } from 'cerebral/tags';
33
import getTemplate from '@codesandbox/common/lib/templates';
4+
import track from '@codesandbox/common/lib/utils/analytics';
45
import * as actions from './actions';
56
import { ensureOwnedEditable, closeModal, openModal } from '../../sequences';
67
import { 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`

0 commit comments

Comments
 (0)