|
1 | 1 | import type React from 'react'; |
2 | | -import { FaGithub, FaLinkedin, FaEnvelope } from 'react-icons/fa'; |
| 2 | +import { useState } from 'react'; |
| 3 | +import { FaBitcoin, FaEthereum, FaGithub, FaLinkedin, FaEnvelope } from 'react-icons/fa'; |
3 | 4 |
|
4 | 5 | const Footer: React.FC = () => { |
5 | 6 | const currentYear = new Date().getFullYear(); |
| 7 | + const [copiedAddress, setCopiedAddress] = useState<string | null>(null); |
| 8 | + |
| 9 | + const btcAddress = 'bc1qkq0g79l2c7s33h28qlevt7jffxajcd3'; |
| 10 | + const ethAddress = '0x846a4460455f9db3c0b3cd1e0e7d1070288e88f2'; |
| 11 | + |
| 12 | + const copyToClipboard = (address: string, label: string) => { |
| 13 | + navigator.clipboard.writeText(address).then(() => { |
| 14 | + setCopiedAddress(label); |
| 15 | + setTimeout(() => setCopiedAddress(null), 2000); |
| 16 | + }).catch(() => {}); |
| 17 | + }; |
6 | 18 |
|
7 | 19 | return ( |
8 | 20 | <footer className="bg-surface-950 text-surface-400 py-16 dark:border-t dark:border-surface-800"> |
@@ -68,7 +80,43 @@ const Footer: React.FC = () => { |
68 | 80 | </div> |
69 | 81 | </div> |
70 | 82 |
|
71 | | - <div className="border-t border-surface-800 pt-8 flex flex-col sm:flex-row justify-between items-center gap-4"> |
| 83 | + {/* Support strip */} |
| 84 | + <div className="border-t border-surface-800 pt-6 pb-6 flex flex-col sm:flex-row items-center justify-between gap-3"> |
| 85 | + <p className="text-xs text-surface-500"> |
| 86 | + Support my projects |
| 87 | + </p> |
| 88 | + <div className="flex flex-wrap items-center gap-3"> |
| 89 | + <a |
| 90 | + href="https://buy.stripe.com/fZucN5epreyuchqdtZfnO00" |
| 91 | + target="_blank" |
| 92 | + rel="noopener noreferrer" |
| 93 | + className="text-xs text-surface-400 hover:text-white transition-colors" |
| 94 | + > |
| 95 | + Stripe |
| 96 | + </a> |
| 97 | + <span className="text-surface-700">|</span> |
| 98 | + <button |
| 99 | + type="button" |
| 100 | + onClick={() => copyToClipboard(btcAddress, 'BTC')} |
| 101 | + className="flex items-center gap-1.5 text-xs text-surface-400 hover:text-white transition-colors" |
| 102 | + > |
| 103 | + <FaBitcoin className="text-xs" /> |
| 104 | + {copiedAddress === 'BTC' ? 'Copied!' : 'BTC'} |
| 105 | + </button> |
| 106 | + <span className="text-surface-700">|</span> |
| 107 | + <button |
| 108 | + type="button" |
| 109 | + onClick={() => copyToClipboard(ethAddress, 'ETH')} |
| 110 | + className="flex items-center gap-1.5 text-xs text-surface-400 hover:text-white transition-colors" |
| 111 | + > |
| 112 | + <FaEthereum className="text-xs" /> |
| 113 | + {copiedAddress === 'ETH' ? 'Copied!' : 'ETH'} |
| 114 | + </button> |
| 115 | + </div> |
| 116 | + </div> |
| 117 | + |
| 118 | + {/* Copyright */} |
| 119 | + <div className="border-t border-surface-800 pt-6 flex flex-col sm:flex-row justify-between items-center gap-4"> |
72 | 120 | <p className="text-xs text-surface-500"> |
73 | 121 | © {currentYear} David Agustin |
74 | 122 | </p> |
|
0 commit comments