refactor: replace anchor tag with Link component for navigation in Actions

This commit is contained in:
twwu 2025-05-29 17:42:00 +08:00
parent 9f724c19db
commit a61f1f8eb0

View File

@ -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'