From 7ba14d2c1403359d4ac40dc70864f4c6898947b0 Mon Sep 17 00:00:00 2001
From: Archer <545436317@qq.com>
Date: Sat, 18 Mar 2023 12:40:05 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E9=A6=96=E9=A1=B5=E6=8F=90=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/Icon/icons/home.svg | 1 +
src/components/Icon/index.tsx | 3 +-
src/pages/chat/components/SlideBar.tsx | 51 +++++++++++++++++---------
3 files changed, 37 insertions(+), 18 deletions(-)
create mode 100644 src/components/Icon/icons/home.svg
diff --git a/src/components/Icon/icons/home.svg b/src/components/Icon/icons/home.svg
new file mode 100644
index 000000000..c8a412051
--- /dev/null
+++ b/src/components/Icon/icons/home.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/components/Icon/index.tsx b/src/components/Icon/index.tsx
index a9ec920b6..b5467792f 100644
--- a/src/components/Icon/index.tsx
+++ b/src/components/Icon/index.tsx
@@ -5,7 +5,8 @@ import dynamic from 'next/dynamic';
const map = {
model: dynamic(() => import('./icons/model.svg')),
- share: dynamic(() => import('./icons/share.svg'))
+ share: dynamic(() => import('./icons/share.svg')),
+ home: dynamic(() => import('./icons/home.svg'))
};
const MyIcon = ({
diff --git a/src/pages/chat/components/SlideBar.tsx b/src/pages/chat/components/SlideBar.tsx
index a5b75d1fe..fa00161e3 100644
--- a/src/pages/chat/components/SlideBar.tsx
+++ b/src/pages/chat/components/SlideBar.tsx
@@ -107,6 +107,23 @@ const SlideBar = ({
>
);
+ const RenderButton = ({ onClick, children }: { onClick: () => void; children: JSX.Element }) => (
+
+
+ {children}
+
+
+ );
+
return (
-
- {
- onOpenShare();
- onClose();
- }}
- >
+ router.push('/')}>
+ <>
+
+ 首页
+ >
+
+
+ {
+ onOpenShare();
+ onClose();
+ }}
+ >
+ <>
- 分享对话
-
-
+ 分享
+ >
+
{/* 分享提示modal */}