From 7363fcf440549de2e6919b9c98803075591a03d7 Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Sat, 21 Oct 2023 00:19:12 +0800 Subject: [PATCH] feat: add website add and code tip --- src/client/components/ModalButton.tsx | 26 +++++++++++++++++++++ src/client/components/WebsiteList.tsx | 33 +++++++++++++++++++++++++-- src/client/pages/Dashboard.tsx | 32 +++++++++++++++++++------- 3 files changed, 81 insertions(+), 10 deletions(-) create mode 100644 src/client/components/ModalButton.tsx diff --git a/src/client/components/ModalButton.tsx b/src/client/components/ModalButton.tsx new file mode 100644 index 0000000..9571b44 --- /dev/null +++ b/src/client/components/ModalButton.tsx @@ -0,0 +1,26 @@ +import { Button, ButtonProps, Modal, ModalProps } from 'antd'; +import React, { useState } from 'react'; + +interface ModalButtonProps { + buttonProps: Omit; + modalProps: Omit; +} +export const ModalButton: React.FC = React.memo((props) => { + const [isOpen, setIsOpen] = useState(false); + + return ( + <> + + {websiteList.length !== 0 && ( + + )} @@ -57,6 +60,19 @@ export const Dashboard: React.FC = React.memo(() => { ) : (
+ {websiteList.length === 0 && ( + +
There is no website has been created
+ + + +
+ } + /> + )} + {websiteList.map((website, i) => ( {i !== 0 && }