Skip to content

Commit

Permalink
adde whatsapp and telegram share button ⚓️
Browse files Browse the repository at this point in the history
  • Loading branch information
4rjunc committed Oct 27, 2024
1 parent 9111c7c commit d2ac109
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/components/Reclaim.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,33 @@ function ReclaimDemo({ onProofReceived }: SocialMedia) {
value={requestUrl}
className="w-full p-3 border border-gray-200 rounded-lg bg-white text-sm font-mono text-gray-900"
/>

{/* Share Buttons */}
<div className="mt-4 flex gap-4">
{/* WhatsApp Share Button */}
<a
href={`https://wa.me/?text=${encodeURIComponent(
`Verify your social media account using this link: ${requestUrl}`,
)}`}
target="_blank"
rel="noopener noreferrer"
className="inline-flex items-center px-4 py-2 text-sm font-medium text-white bg-green-500 rounded-lg hover:bg-green-600 transition-colors"
>
Share on WhatsApp
</a>

{/* Telegram Share Button */}
<a
href={`https://t.me/share/url?url=${encodeURIComponent(requestUrl)}&text=${encodeURIComponent(
"Verify your social media account using this link!",
)}`}
target="_blank"
rel="noopener noreferrer"
className="inline-flex items-center px-4 py-2 text-sm font-medium text-white bg-blue-500 rounded-lg hover:bg-blue-600 transition-colors"
>
Share on Telegram
</a>
</div>
</div>
)}
{/* Success State */}
Expand Down

0 comments on commit d2ac109

Please sign in to comment.