feat(editor): switch initial route based on feature flag (#4383)

* feat: switch initial route based on feature flag

* style: change code to optional chaining
This commit is contained in:
Alex Grozav
2022-10-20 13:14:48 +03:00
committed by GitHub
parent 0e044f7684
commit 6d25eed050

View File

@@ -69,7 +69,9 @@ const router = new Router({
name: VIEWS.HOMEPAGE, name: VIEWS.HOMEPAGE,
meta: { meta: {
getRedirect(store: Store<IRootState>) { 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: { permissions: {
allow: { allow: {