diff --git a/web/app/(commonLayout)/datasets/DatasetCard.tsx b/web/app/(commonLayout)/datasets/DatasetCard.tsx index d4b83f8a1f..ed8d680c19 100644 --- a/web/app/(commonLayout)/datasets/DatasetCard.tsx +++ b/web/app/(commonLayout)/datasets/DatasetCard.tsx @@ -1,7 +1,7 @@ 'use client' import { useContext } from 'use-context-selector' -import Link from 'next/link' +import { useRouter } from 'next/navigation' import { useCallback, useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' import { @@ -33,6 +33,8 @@ const DatasetCard = ({ }: DatasetCardProps) => { const { t } = useTranslation() const { notify } = useContext(ToastContext) + const { push } = useRouter() + const { isCurrentWorkspaceDatasetOperator } = useAppContext() const [tags, setTags] = useState(dataset.tags) @@ -107,10 +109,13 @@ const DatasetCard = ({ return ( <> - { + e.preventDefault() + push(`/datasets/${dataset.id}/documents`) + }} >
- + {showRenameModal && (