From 1479fb89fd66612bc6908760e04556d2dd89ef87 Mon Sep 17 00:00:00 2001 From: zhwcreate <3331598351@qq.com> Date: Tue, 16 Jul 2024 11:08:38 +0800 Subject: [PATCH] fix: some bug --- src/app/(main)/(router)/dashboard/page.tsx | 19 +++++-- src/app/edit/(main)/(router)/file/page.tsx | 52 +------------------ .../modals/create-project-modal/index.tsx | 5 +- 3 files changed, 19 insertions(+), 57 deletions(-) diff --git a/src/app/(main)/(router)/dashboard/page.tsx b/src/app/(main)/(router)/dashboard/page.tsx index 77e407a..7776405 100644 --- a/src/app/(main)/(router)/dashboard/page.tsx +++ b/src/app/(main)/(router)/dashboard/page.tsx @@ -16,17 +16,17 @@ const TemplateCardData = [ ]; const LinkCardData = [ { - linkText: 'Node', + linkText: 'Node1', LinkUrl: 'https://www.baidu.com', linkDesc: 'ai帮助你学习前端后端运维安全', }, { - linkText: 'Node', + linkText: 'Node2', LinkUrl: 'https://www.baidu.com', linkDesc: 'ai帮助你学习前端后端运维安全', }, { - linkText: 'Node', + linkText: 'Node3', LinkUrl: 'https://www.baidu.com', linkDesc: 'ai帮助你学习前端后端运维安全', }, @@ -34,7 +34,10 @@ const LinkCardData = [ function createTemplateCard(templateName: string, templateIconUrl: string) { return ( -
+
@@ -57,7 +60,13 @@ function createTemplateCard(templateName: string, templateIconUrl: string) { function createLinkCard(linkText: string, linkUrl: string, linkDesc: string) { return ( - +
diff --git a/src/app/edit/(main)/(router)/file/page.tsx b/src/app/edit/(main)/(router)/file/page.tsx index 7944549..a6aa4d9 100644 --- a/src/app/edit/(main)/(router)/file/page.tsx +++ b/src/app/edit/(main)/(router)/file/page.tsx @@ -8,56 +8,6 @@ import { TreeViewElement } from '@/components/extension/tree-view-api'; const FileTree = dynamic(() => import('@/components/file/fileTree'), { ssr: false }); -// const data = [ -// { -// id: '1', -// filename: 'components', -// children: [ -// { -// id: '2', -// filename: 'extension', -// children: [ -// { -// id: '3', -// filename: 'tree-view.tsx', -// value: '我42424是page8', -// }, -// { -// id: '4', -// filename: 'tree-view-api.tsx', -// value: '11111我是page8', -// }, -// ], -// }, -// { -// id: '5', -// filename: 'dashboard-tree.tsx', -// value: '我4242是page8', -// }, -// ], -// }, -// { -// id: '6', -// filename: 'pages', -// children: [ -// { -// id: '7', -// filename: 'page.tsx', -// value: '我是page31318', -// }, -// { -// id: '8', -// filename: 'page-guide.tsx', -// value: '我是page8', -// }, -// ], -// }, -// { -// id: '18', -// filename: 'env.ts', -// value: '我是page118', -// }, -// ]; const PortsPage: React.FC = () => { const { fileData } = useUploadFileDataStore(); if (fileData === null) return null; @@ -66,7 +16,7 @@ const PortsPage: React.FC = () => { if (!Array.isArray(fileData)) data = [fileData]; return ( -
+
资源管理器
diff --git a/src/components/modals/create-project-modal/index.tsx b/src/components/modals/create-project-modal/index.tsx index d15c807..7a39dcd 100644 --- a/src/components/modals/create-project-modal/index.tsx +++ b/src/components/modals/create-project-modal/index.tsx @@ -35,9 +35,12 @@ export const CreateProjectModal = () => { onClose(); setFileData(res); router.push('edit/file'); - setLoading(false); }, 1000); } + + setTimeout(() => { + setLoading(false); + }, 1000); }} className="flex justify-center flex-col items-center mt-2 gap-x-2 py-6 border-white/20 border-[1px] rounded-sm cursor-pointer" >