From add1c677e3b35d51a910088b345c9454e52902dc Mon Sep 17 00:00:00 2001 From: tangly Date: Sat, 6 Nov 2021 15:19:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=87=E7=AD=BE=E6=8E=92=E5=BA=8F=20?= =?UTF-8?q?=E5=A5=96=E8=B5=8F=E6=8C=89=E9=92=AE=20=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E6=A1=86=E6=8C=89=E9=92=AE=E5=8A=A0=E8=BD=BD=E5=8A=A8=E7=94=BB?= =?UTF-8?q?=20EndSlogan=E6=8E=92=E7=89=88=20notion-viewport=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/BlogPostCard.js | 2 +- components/RewardButton.js | 35 +++++++---------------------------- components/SearchInput.js | 7 +++++-- components/TagItemMini.js | 6 +++--- components/TagList.js | 14 +++++++------- components/TagsBar.js | 8 ++++---- lib/notion/getAllTags.js | 10 +++++++++- pages/article/[slug].js | 6 +++--- styles/notion.css | 8 +++----- 9 files changed, 42 insertions(+), 54 deletions(-) diff --git a/components/BlogPostCard.js b/components/BlogPostCard.js index 140b27da..27c50b17 100644 --- a/components/BlogPostCard.js +++ b/components/BlogPostCard.js @@ -21,9 +21,9 @@ const BlogPostCard = ({ post }) => {
{post.category}
- {post.tags.map(tag => ())} {post.date.start_date} +
{post.tags.map(tag => ())}

{post.summary}

diff --git a/components/RewardButton.js b/components/RewardButton.js index 1e6de761..e0b12354 100644 --- a/components/RewardButton.js +++ b/components/RewardButton.js @@ -1,51 +1,30 @@ import React from 'react' -import { createPopper } from '@popperjs/core' /** * 赞赏按钮 * @returns {JSX.Element} * @constructor */ -const RewardButton = () => { +const RewardButton = () => { const [popoverShow, setPopoverShow] = React.useState(false) const btnRef = React.createRef() - const popoverRef = React.createRef() const openPopover = () => { - createPopper(btnRef.current, popoverRef.current, { - placement: 'top' - }) setPopoverShow(true) } const closePopover = () => { setPopoverShow(false) } return ( -
{ - openPopover() - }} - onMouseLeave={() => { - closePopover() - }}> -
-
- - 打赏 -
+
+
+ + 打赏
-