微信分享

This commit is contained in:
2026-07-09 17:14:00 +08:00
parent 3d3588babb
commit 3f60c37265
9 changed files with 180 additions and 3 deletions
@@ -0,0 +1,14 @@
import { useEffect } from 'react';
import { useLocation } from 'react-router-dom';
import { applyDefaultWechatShare } from '../lib/wechat-share';
/** 路由变化时刷新微信右上角分享卡片 */
export default function WechatShareBootstrap() {
const location = useLocation();
useEffect(() => {
void applyDefaultWechatShare().catch(() => {});
}, [location.pathname, location.search]);
return null;
}