Skip to content

Commit a033ac1

Browse files
committed
dev
1 parent eb487b0 commit a033ac1

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

src/components/Profile/Profile.jsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ function Card({ data }) {
100100
}
101101
const shareUrl = `https://www.devdisplay.org/profile/${profileFileName}`;
102102

103-
// Tooltip share actions
104103
const handleShareX = () => {
105104
const caption = encodeURIComponent(`🚀 Check out my DevDisplay profile! #DevDisplay\n${shareUrl}`);
106105
window.open(`https://x.com/intent/tweet?text=${caption}`, '_blank');
@@ -115,17 +114,14 @@ function Card({ data }) {
115114
navigator.clipboard.writeText(shareUrl);
116115
setShowTooltip(false);
117116
};
118-
// Improved QR download handler: balanced text, padding, and border
119117
const handleDownloadQR = () => {
120118
const svg = document.getElementById('profile-qr-code');
121119
if (!svg) return;
122120
const serializer = new XMLSerializer();
123121
const svgStr = serializer.serializeToString(svg);
124122
const qrImg = new window.Image();
125123
qrImg.onload = function () {
126-
// Target square size
127124
const size = 864;
128-
// QR code size inside the square (with padding)
129125
const qrSize = 640;
130126
const padding = (size - qrSize) / 2;
131127
const borderRadius = 60;
@@ -163,7 +159,6 @@ function Card({ data }) {
163159
ctx.fillText(text, size / 2, textPaddingTop);
164160
const gapBelowText = 48;
165161
ctx.drawImage(qrImg, padding, textPaddingTop + textFontSize + gapBelowText, qrSize, qrSize);
166-
// Download
167162
const pngFile = canvas.toDataURL('image/png');
168163
const downloadLink = document.createElement('a');
169164
downloadLink.href = pngFile;

0 commit comments

Comments
 (0)