Skip to content

Commit

Permalink
feat(editor): switch initial route based on feature flag (#4383)
Browse files Browse the repository at this point in the history
* feat: switch initial route based on feature flag

* style: change code to optional chaining
  • Loading branch information
alexgrozav committed Oct 20, 2022
1 parent 0e044f7 commit 6d25eed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/editor-ui/src/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ const router = new Router({
name: VIEWS.HOMEPAGE,
meta: {
getRedirect(store: Store<IRootState>) {
return { name: VIEWS.WORKFLOWS };
const startOnNewWorkflowRouteFlag = window.posthog?.isFeatureEnabled?.('start-at-wf-empty-state');

return { name: startOnNewWorkflowRouteFlag ? VIEWS.NEW_WORKFLOW : VIEWS.WORKFLOWS };
},
permissions: {
allow: {
Expand Down

0 comments on commit 6d25eed

Please sign in to comment.