diff --git a/src/pages/Pokemon/components/Header.tsx b/src/pages/Pokemon/components/Header.tsx index 3a6fd7a2..5a5846cf 100644 --- a/src/pages/Pokemon/components/Header.tsx +++ b/src/pages/Pokemon/components/Header.tsx @@ -42,6 +42,20 @@ export function Header({ pm }: Props) { } export function HeaderName({ pm }: Props) { + const shareData = { + title: `${pm.nameZh}`, + text: `${pm.nameZh}圖鑑\n`, + url: document.location.href, + }; + + const share = async () => { + try { + await navigator.share(shareData); + } catch (err) { + alert(err); + } + }; + return (