From 2613a380b687584d154d1d5e41ae4b5ac5270c71 Mon Sep 17 00:00:00 2001 From: twwu Date: Tue, 29 Apr 2025 15:47:29 +0800 Subject: [PATCH] fix: Correct link path for creating datasets and optimize Link component with memoization --- web/app/(commonLayout)/datasets/new-dataset-card/index.tsx | 2 +- web/app/(commonLayout)/datasets/new-dataset-card/link.tsx | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/web/app/(commonLayout)/datasets/new-dataset-card/index.tsx b/web/app/(commonLayout)/datasets/new-dataset-card/index.tsx index f0d580cbdd..0425a97ab5 100644 --- a/web/app/(commonLayout)/datasets/new-dataset-card/index.tsx +++ b/web/app/(commonLayout)/datasets/new-dataset-card/index.tsx @@ -22,7 +22,7 @@ const CreateAppCard = ({ return (
- +
diff --git a/web/app/(commonLayout)/datasets/new-dataset-card/link.tsx b/web/app/(commonLayout)/datasets/new-dataset-card/link.tsx index 906476d0bb..5e356958f8 100644 --- a/web/app/(commonLayout)/datasets/new-dataset-card/link.tsx +++ b/web/app/(commonLayout)/datasets/new-dataset-card/link.tsx @@ -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)