Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

reuse layout (#2956)

legaod5214e464423
diff --git a/web/app/(commonLayout)/datasets/NewDatasetCard.tsx b/web/app/(commonLayout)/datasets/NewDatasetCard.tsx
index 72f6b18dcc2..079fd0e82b5 100644
--- a/web/app/(commonLayout)/datasets/NewDatasetCard.tsx
+++ b/web/app/(commonLayout)/datasets/NewDatasetCard.tsx
@@ -1,16 +1,16 @@
'use client'
-import { forwardRef, useState } from 'react'
+import { forwardRef } from 'react'
import classNames from 'classnames'
import { useTranslation } from 'react-i18next'
+import Link from 'next/link'
import style from '../list.module.css'
const CreateAppCard = forwardRef<HTMLAnchorElement>((_, ref) => {
const { t } = useTranslation()
- const [showNewAppDialog, setShowNewAppDialog] = useState(false)
return (
- <a ref={ref} className={classNames(style.listItem, style.newItemCard)} href='/datasets/create'>
+ <Link ref={ref} className={classNames(style.listItem, style.newItemCard)} href='/datasets/create'>
<div className={style.listItemTitle}>
<span className={style.newItemIcon}>
<span className={classNames(style.newItemIconImage, style.newItemIconAdd)} />
@@ -21,8 +21,10 @@ const CreateAppCard = forwardRef<HTMLAnchorElement>((_, ref) => {
</div>
<div className={style.listItemDescription}>{t('dataset.createDatasetIntro')}</div>
{/* <div className='text-xs text-gray-500'>{t('app.createFromConfigFile')}</div> */}
- </a>
+ </Link>
)
})
+CreateAppCard.displayName = 'CreateAppCard'
+
export default CreateAppCard
diff --git a/web/app/components/header/HeaderWrapper.tsx b/web/app/components/header/HeaderWrapper.tsx
index 0e02195ac22..e0f6cfc1115 100644
--- a/web/app/components/header/HeaderWrapper.tsx
+++ b/web/app/components/header/HeaderWrapper.tsx
@@ -11,7 +11,7 @@ const HeaderWrapper = ({
children,
}: HeaderWrapperProps) => {
const pathname = usePathname()
- const isBordered = ['/apps', '/datasets'].includes(pathname)
+ const isBordered = ['/apps', '/datasets', '/datasets/create'].includes(pathname)
return (
<div className={classNames(