mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2026-09-24 15:00:31 +08:00
fix: edit in editor button (#5652)
This commit is contained in:
@@ -3,6 +3,6 @@
|
||||
"enabled": false
|
||||
},
|
||||
"_variables": {
|
||||
"lastUpdateCheck": 1714413381505
|
||||
"lastUpdateCheck": 1715513047752
|
||||
}
|
||||
}
|
||||
@@ -294,7 +294,10 @@ export function GenerateRoadmap(props: GenerateRoadmapProps) {
|
||||
|
||||
setIsLoading(false);
|
||||
pageProgressMessage.set('');
|
||||
return response.roadmapSlug;
|
||||
return {
|
||||
roadmapId: response.roadmapId,
|
||||
roadmapSlug: response.roadmapSlug,
|
||||
};
|
||||
};
|
||||
|
||||
const downloadGeneratedRoadmapContent = async () => {
|
||||
@@ -686,9 +689,9 @@ export function GenerateRoadmap(props: GenerateRoadmapProps) {
|
||||
<button
|
||||
className="inline-flex items-center justify-center gap-2 rounded-md bg-gray-200 py-1.5 pl-2.5 pr-3 text-xs font-medium text-black transition-colors duration-300 hover:bg-gray-300 sm:text-sm"
|
||||
onClick={async () => {
|
||||
const roadmapSlug = await saveAIRoadmap();
|
||||
if (roadmapSlug) {
|
||||
window.location.href = `/r/${roadmapSlug}`;
|
||||
const response = await saveAIRoadmap();
|
||||
if (response?.roadmapSlug) {
|
||||
window.location.href = `/r/${response.roadmapSlug}`;
|
||||
}
|
||||
}}
|
||||
disabled={isLoading}
|
||||
@@ -703,10 +706,10 @@ export function GenerateRoadmap(props: GenerateRoadmapProps) {
|
||||
<button
|
||||
className="hidden items-center justify-center gap-2 rounded-md bg-gray-200 py-1.5 pl-2.5 pr-3 text-xs font-medium text-black transition-colors duration-300 hover:bg-gray-300 sm:inline-flex sm:text-sm"
|
||||
onClick={async () => {
|
||||
const roadmapId = await saveAIRoadmap();
|
||||
if (roadmapId) {
|
||||
const response = await saveAIRoadmap();
|
||||
if (response?.roadmapId) {
|
||||
window.open(
|
||||
`${import.meta.env.PUBLIC_EDITOR_APP_URL}/${roadmapId}`,
|
||||
`${import.meta.env.PUBLIC_EDITOR_APP_URL}/${response?.roadmapId}`,
|
||||
'_blank',
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user