fix: personalize roadmap

This commit is contained in:
Arik Chakma
2025-09-25 19:07:28 +06:00
parent c3e3d52832
commit 363b6a806d
4 changed files with 8 additions and 3 deletions

View File

@@ -427,6 +427,10 @@ export function RoadmapFloatingChat(props: RoadmapChatProps) {
roadmapId={roadmapId}
activeChatHistoryId={activeChatHistoryId}
onChatHistoryClick={(chatHistoryId) => {
if (activeChatHistoryId === chatHistoryId) {
return;
}
setIsChatHistoryLoading(true);
setActiveChatHistoryId(chatHistoryId);
}}

View File

@@ -41,7 +41,7 @@ export function ChatPersona(props: ChatPersonaProps) {
queryClient,
);
const roadmapTitle = roadmap?.json.title ?? '';
const roadmapTitle = roadmap?.json.title?.page ?? '';
return (
<div className="relative mx-auto flex h-auto max-w-[400px] grow flex-col justify-center p-4 px-2 px-4 sm:h-full sm:p-4">

View File

@@ -52,7 +52,7 @@ export function UpdatePersonaModal(props: UpdatePersonaModalProps) {
queryClient,
);
const roadmapTitle = roadmap?.json.title ?? '';
const roadmapTitle = roadmap?.json?.title?.page ?? '';
return (
<Modal

View File

@@ -1,10 +1,11 @@
import { queryOptions } from '@tanstack/react-query';
import { httpGet } from '../lib/query-http';
import { type Node, type Edge, renderFlowJSON } from '@roadmapsh/editor';
import type { OfficialRoadmapDocument } from './official-roadmap';
export type RoadmapJSON = {
_id: string;
title: string;
title: OfficialRoadmapDocument['title'];
description: string;
slug: string;
nodes: Node[];