From d5214e4644230488a589b8653a5a43a85660e02d Mon Sep 17 00:00:00 2001 From: legao <837937787@qq.com> Date: Mon, 25 Mar 2024 07:13:50 +0000 Subject: [PATCH] reuse layout (#2956) --- web/app/(commonLayout)/datasets/NewDatasetCard.tsx | 10 ++++++---- web/app/components/header/HeaderWrapper.tsx | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/web/app/(commonLayout)/datasets/NewDatasetCard.tsx b/web/app/(commonLayout)/datasets/NewDatasetCard.tsx index 72f6b18dcc..079fd0e82b 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((_, ref) => { const { t } = useTranslation() - const [showNewAppDialog, setShowNewAppDialog] = useState(false) return ( - +
@@ -21,8 +21,10 @@ const CreateAppCard = forwardRef((_, ref) => {
{t('dataset.createDatasetIntro')}
{/*
{t('app.createFromConfigFile')}
*/} -
+ ) }) +CreateAppCard.displayName = 'CreateAppCard' + export default CreateAppCard diff --git a/web/app/components/header/HeaderWrapper.tsx b/web/app/components/header/HeaderWrapper.tsx index 0e02195ac2..e0f6cfc111 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 (