Skip to content

Commit

Permalink
fix(dashboard): studio auth flow
Browse files Browse the repository at this point in the history
  • Loading branch information
scopsy committed Dec 17, 2024
1 parent 87d25bd commit 93fb821
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 10 additions & 1 deletion apps/dashboard/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
ActivityFeed,
} from '@/pages';
import './index.css';
import { ROUTES } from './utils/routes';
import { LEGACY_ROUTES, ROUTES } from './utils/routes';
import { EditWorkflowPage } from './pages/edit-workflow';
import { TestWorkflowPage } from './pages/test-workflow';
import { initializeSentry } from './utils/sentry';
Expand Down Expand Up @@ -157,6 +157,15 @@ const router = createBrowserRouter([
path: ROUTES.SETTINGS_BILLING,
element: <SettingsPage />,
},
{
path: ROUTES.LOCAL_STUDIO_AUTH,
element: (() => {
const currentSearch = window.location.search;
window.location.href = `${LEGACY_ROUTES.LOCAL_STUDIO_AUTH}${currentSearch}&studio_path_hint=/legacy/studio`;

return null;
})(),
},
{
path: '*',
element: <CatchAllRoute />,
Expand Down
2 changes: 2 additions & 0 deletions apps/dashboard/src/utils/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export const ROUTES = {
INBOX_EMBED: '/onboarding/inbox/embed',
INBOX_EMBED_SUCCESS: '/onboarding/inbox/success',
ROOT: '/',
LOCAL_STUDIO_AUTH: '/local-studio/auth',
ENV: '/env',
SETTINGS: '/settings',
SETTINGS_ACCOUNT: '/settings/account',
Expand Down Expand Up @@ -40,4 +41,5 @@ export const LEGACY_ROUTES = {
SETTINGS: '/legacy/manage-account/user-profile',
EDIT_WORKFLOW: '/legacy/workflows/edit/:workflowId',
TEST_WORKFLOW: '/legacy/workflows/edit/:workflowId/test-workflow',
LOCAL_STUDIO_AUTH: '/legacy/local-studio/auth',
};

0 comments on commit 93fb821

Please sign in to comment.