mirror of
https://github.com/langgenius/dify.git
synced 2025-11-02 03:43:12 +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 { useParams } from 'next/navigation'
|
||||
import { RiArrowRightLine } from '@remixicon/react'
|
||||
import Link from 'next/link'
|
||||
|
||||
type ActionsProps = {
|
||||
disabled?: boolean
|
||||
@ -18,8 +19,9 @@ const Actions = ({
|
||||
|
||||
return (
|
||||
<div className='flex justify-end gap-x-2'>
|
||||
<a
|
||||
<Link
|
||||
href={`/datasets/${datasetId}/documents`}
|
||||
replace
|
||||
>
|
||||
<Button
|
||||
variant='ghost'
|
||||
@ -27,7 +29,7 @@ const Actions = ({
|
||||
>
|
||||
{t('common.operation.cancel')}
|
||||
</Button>
|
||||
</a>
|
||||
</Link>
|
||||
<Button
|
||||
disabled={disabled}
|
||||
variant='primary'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user