Fix: Remove ${basePath} from the <Link> tag's href attribute. (#22636)
This commit is contained in:
parent
ff8fc96ebb
commit
5985055aef
3 changed files with 4 additions and 7 deletions
|
|
@ -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<ISelectDataSetProps> = ({
|
|||
}}
|
||||
>
|
||||
<span className='text-text-tertiary'>{t('appDebug.feature.dataSet.noDataSet')}</span>
|
||||
<Link href={`${basePath}/datasets/create`} className='font-normal text-text-accent'>{t('appDebug.feature.dataSet.toCreate')}</Link>
|
||||
<Link href='/datasets/create' className='font-normal text-text-accent'>{t('appDebug.feature.dataSet.toCreate')}</Link>
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue