mirror of
https://github.com/lobehub/lobehub.git
synced 2026-03-27 13:29:15 +07:00
🐛 fix: fixed the knowledge files cant open error (#10386)
fix: fixed the knowledge files cant open error
This commit is contained in:
@@ -385,6 +385,11 @@ export const createDesktopRouter = (locale: Locales) =>
|
||||
element: <KnowledgeHome />,
|
||||
index: true,
|
||||
},
|
||||
{
|
||||
element: <KnowledgeHome />,
|
||||
loader: idLoader,
|
||||
path: ':id',
|
||||
},
|
||||
{
|
||||
element: <KnowledgeBasesList />,
|
||||
path: 'bases',
|
||||
|
||||
@@ -402,6 +402,11 @@ export const createMobileRouter = (locale: Locales) =>
|
||||
element: <KnowledgeHome />,
|
||||
index: true,
|
||||
},
|
||||
{
|
||||
element: <KnowledgeHome />,
|
||||
loader: idLoader,
|
||||
path: ':id',
|
||||
},
|
||||
{
|
||||
element: <KnowledgeBasesList />,
|
||||
path: 'bases',
|
||||
|
||||
@@ -104,7 +104,7 @@ const Home = memo<HomeProps>(({ knowledgeBaseId, onOpenFile }) => {
|
||||
const handleDocumentClick = (documentId: string) => {
|
||||
// Navigate to the document in the explorer
|
||||
// The KnowledgeHomePage will automatically set category to 'documents' when it detects the id param
|
||||
navigate(`/${documentId}`);
|
||||
navigate(`/knowledge/${documentId}`);
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user