mirror of
https://github.com/langgenius/dify.git
synced 2025-11-11 08:53:17 +00:00
refactor: replace anchor tag with Link component for navigation in Actions
This commit is contained in:
parent
9f724c19db
commit
a61f1f8eb0
@ -3,6 +3,7 @@ import Button from '@/app/components/base/button'
|
|||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { useParams } from 'next/navigation'
|
import { useParams } from 'next/navigation'
|
||||||
import { RiArrowRightLine } from '@remixicon/react'
|
import { RiArrowRightLine } from '@remixicon/react'
|
||||||
|
import Link from 'next/link'
|
||||||
|
|
||||||
type ActionsProps = {
|
type ActionsProps = {
|
||||||
disabled?: boolean
|
disabled?: boolean
|
||||||
@ -18,8 +19,9 @@ const Actions = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='flex justify-end gap-x-2'>
|
<div className='flex justify-end gap-x-2'>
|
||||||
<a
|
<Link
|
||||||
href={`/datasets/${datasetId}/documents`}
|
href={`/datasets/${datasetId}/documents`}
|
||||||
|
replace
|
||||||
>
|
>
|
||||||
<Button
|
<Button
|
||||||
variant='ghost'
|
variant='ghost'
|
||||||
@ -27,7 +29,7 @@ const Actions = ({
|
|||||||
>
|
>
|
||||||
{t('common.operation.cancel')}
|
{t('common.operation.cancel')}
|
||||||
</Button>
|
</Button>
|
||||||
</a>
|
</Link>
|
||||||
<Button
|
<Button
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
variant='primary'
|
variant='primary'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user