From 5985055aef7be28e783e0accc6be3259fbcf3a62 Mon Sep 17 00:00:00 2001
From: BXbing <58453376+BXbing@users.noreply.github.com>
Date: Sat, 19 Jul 2025 22:07:29 +0800
Subject: [PATCH] Fix: Remove ${basePath} from the tag's href attribute.
(#22636)
---
web/app/(commonLayout)/datasets/NewDatasetCard.tsx | 5 ++---
.../configuration/dataset-config/select-dataset/index.tsx | 3 +--
web/app/components/header/dataset-nav/index.tsx | 3 +--
3 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/web/app/(commonLayout)/datasets/NewDatasetCard.tsx b/web/app/(commonLayout)/datasets/NewDatasetCard.tsx
index f3532f398d..62f6a34be0 100644
--- a/web/app/(commonLayout)/datasets/NewDatasetCard.tsx
+++ b/web/app/(commonLayout)/datasets/NewDatasetCard.tsx
@@ -1,6 +1,5 @@
'use client'
import { useTranslation } from 'react-i18next'
-import { basePath } from '@/utils/var'
import {
RiAddLine,
RiArrowRightLine,
@@ -18,7 +17,7 @@ const CreateAppCard = ({ ref }: CreateAppCardProps) => {
-
+
{
{t('dataset.createDatasetIntro')}
-
+
{t('dataset.connectDataset')}
diff --git a/web/app/components/app/configuration/dataset-config/select-dataset/index.tsx b/web/app/components/app/configuration/dataset-config/select-dataset/index.tsx
index ffdb714f08..4c36ad9956 100644
--- a/web/app/components/app/configuration/dataset-config/select-dataset/index.tsx
+++ b/web/app/components/app/configuration/dataset-config/select-dataset/index.tsx
@@ -14,7 +14,6 @@ import Loading from '@/app/components/base/loading'
import Badge from '@/app/components/base/badge'
import { useKnowledge } from '@/hooks/use-knowledge'
import cn from '@/utils/classnames'
-import { basePath } from '@/utils/var'
export type ISelectDataSetProps = {
isShow: boolean
@@ -112,7 +111,7 @@ const SelectDataSet: FC
= ({
}}
>
{t('appDebug.feature.dataSet.noDataSet')}
- {t('appDebug.feature.dataSet.toCreate')}
+ {t('appDebug.feature.dataSet.toCreate')}
)}
diff --git a/web/app/components/header/dataset-nav/index.tsx b/web/app/components/header/dataset-nav/index.tsx
index 85223f9f37..d10bf94ebe 100644
--- a/web/app/components/header/dataset-nav/index.tsx
+++ b/web/app/components/header/dataset-nav/index.tsx
@@ -14,7 +14,6 @@ import Nav from '../nav'
import type { NavItem } from '../nav/nav-selector'
import { fetchDatasetDetail, fetchDatasets } from '@/service/datasets'
import type { DataSetListResponse } from '@/models/datasets'
-import { basePath } from '@/utils/var'
const getKey = (pageIndex: number, previousPageData: DataSetListResponse) => {
if (!pageIndex || previousPageData.has_more)
@@ -57,7 +56,7 @@ const DatasetNav = () => {
icon_background: dataset.icon_background,
})) as NavItem[]}
createText={t('common.menus.newDataset')}
- onCreate={() => router.push(`${basePath}/datasets/create`)}
+ onCreate={() => router.push('/datasets/create')}
onLoadmore={handleLoadmore}
isApp={false}
/>