mirror of
https://github.com/langgenius/dify.git
synced 2026-01-08 07:14:14 +00:00
fix: Correct link path for creating datasets and optimize Link component with memoization
This commit is contained in:
@@ -22,7 +22,7 @@ const CreateAppCard = ({
|
||||
return (
|
||||
<div className='flex min-h-[166px] flex-col gap-y-0.5 rounded-xl bg-background-default-dimmed'>
|
||||
<div className='flex grow flex-col items-center justify-center p-2'>
|
||||
<Link href={`${basePath}/datasets/create-pipeline`} Icon={RiFunctionAddLine} text={t('dataset.createFromPipeline')} />
|
||||
<Link href={`${basePath}/datasets/create-from-pipeline`} Icon={RiFunctionAddLine} text={t('dataset.createFromPipeline')} />
|
||||
<Link ref={ref} href={`${basePath}/datasets/create`} Icon={RiAddLine} text={t('dataset.createDataset')} />
|
||||
</div>
|
||||
<div className='border-t-[0.5px] border-divider-subtle p-2'>
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import React from 'react'
|
||||
|
||||
type LinkProps = {
|
||||
Icon: React.ComponentType<{ className?: string }>
|
||||
text: string
|
||||
@@ -23,4 +25,4 @@ const Link = ({
|
||||
)
|
||||
}
|
||||
|
||||
export default Link
|
||||
export default React.memo(Link)
|
||||
|
||||
Reference in New Issue
Block a user