|
|
@ -168,10 +168,13 @@ export function GenerateRoadmap() { |
|
|
|
const roadmapId = result.match(ROADMAP_ID_REGEX)?.[1] || ''; |
|
|
|
const roadmapId = result.match(ROADMAP_ID_REGEX)?.[1] || ''; |
|
|
|
setUrlParams({ id: roadmapId }); |
|
|
|
setUrlParams({ id: roadmapId }); |
|
|
|
result = result.replace(ROADMAP_ID_REGEX, ''); |
|
|
|
result = result.replace(ROADMAP_ID_REGEX, ''); |
|
|
|
|
|
|
|
const roadmapTitle = |
|
|
|
|
|
|
|
result.trim().split('\n')[0]?.replace('#', '')?.trim() || term; |
|
|
|
|
|
|
|
setRoadmapTerm(roadmapTitle); |
|
|
|
setCurrentRoadmap({ |
|
|
|
setCurrentRoadmap({ |
|
|
|
id: roadmapId, |
|
|
|
id: roadmapId, |
|
|
|
term: roadmapTerm, |
|
|
|
term: roadmapTerm, |
|
|
|
title: term, |
|
|
|
title: roadmapTitle, |
|
|
|
data: result, |
|
|
|
data: result, |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|