Open roadmap editor in same window

pull/4631/head
Kamran Ahmed 1 year ago
parent 5e7ec4f8d8
commit 14ea7ba0ad
  1. 6
      src/components/CreateVersion/CreateVersion.tsx

@ -2,7 +2,7 @@ import { useEffect, useState } from 'react';
import { httpGet, httpPost } from '../../lib/http'; import { httpGet, httpPost } from '../../lib/http';
import { useToast } from '../../hooks/use-toast'; import { useToast } from '../../hooks/use-toast';
import { isLoggedIn } from '../../lib/jwt'; import { isLoggedIn } from '../../lib/jwt';
import { GitFork, Layers2, Loader2, Map } from 'lucide-react'; import { GitFork, Loader2, Map } from 'lucide-react';
import { showLoginPopup } from '../../lib/popup'; import { showLoginPopup } from '../../lib/popup';
import type { RoadmapDocument } from '../CustomRoadmap/CreateRoadmap/CreateRoadmapModal.tsx'; import type { RoadmapDocument } from '../CustomRoadmap/CreateRoadmap/CreateRoadmapModal.tsx';
@ -67,11 +67,9 @@ export function CreateVersion(props: CreateVersionProps) {
return; return;
} }
const roadmapEditorUrl = `${ window.location.href = `${
import.meta.env.PUBLIC_EDITOR_APP_URL import.meta.env.PUBLIC_EDITOR_APP_URL
}/${response?.roadmapId}`; }/${response?.roadmapId}`;
window.open(roadmapEditorUrl, '_blank');
} }
if (isLoading) { if (isLoading) {

Loading…
Cancel
Save