diff --git a/src/components/DonateCard/index.tsx b/src/components/DonateCard/index.tsx index d983db7f..50ff5e7a 100644 --- a/src/components/DonateCard/index.tsx +++ b/src/components/DonateCard/index.tsx @@ -64,14 +64,16 @@ export const DonateCard = () => { } useLayoutEffect(() => { - if (chapterNumber && chapterNumber !== 0 && chapterNumber % 10 === 0) { - const storedDate = window.localStorage.getItem(DONATE_DATE) - const date = dayjs(storedDate) + if (chapterNumber && chapterNumber !== 0 && chapterNumber % 5 === 0) { const now = dayjs() - const diff = now.diff(date, 'day') - if (!storedDate || diff > 60) { - setShow(true) + + const storedDonateDate = window.localStorage.getItem(DONATE_DATE) + if (storedDonateDate) { + const diff = now.diff(dayjs(storedDonateDate), 'day') + if (diff <= 30) return } + + setShow(true) } }, [chapterNumber]) @@ -112,20 +114,27 @@ export const DonateCard = () => {
- 您刚刚完成了
+ Qwerty Learner 坚持 开源、无广告、无商业化 已经
+
- Qwerty Learner 已经坚持 开放源码、无广告、无商业化 运营
-
为了感谢您的慷慨,单次 50 rmb 及以上的捐赠, 我们将回赠 Qwerty 的定制贴纸 5 枚 @@ -146,7 +155,7 @@ export const DonateCard = () => { 我已捐赠