Skip to content

Commit e181e22

Browse files
committed
fix(profile): use concise compare and share button labels on mobile
1 parent 71dcff5 commit e181e22

3 files changed

Lines changed: 16 additions & 3 deletions

File tree

components/user-profile-client.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,8 @@ export function UserProfileClient({ user, location, countryParam }: Props) {
316316
<Link href={compareUrl as Route} className="w-full sm:w-auto">
317317
<Button className="flex w-full items-center justify-center gap-1.5 px-3 text-xs shadow-sm sm:px-4 sm:text-sm">
318318
<Scale className="h-4 w-4 shrink-0" />
319-
<span className="truncate">{t("profile.compareWith")}</span>
319+
<span className="truncate sm:hidden">{t("profile.compareShort")}</span>
320+
<span className="hidden truncate sm:inline">{t("profile.compareWith")}</span>
320321
</Button>
321322
</Link>
322323

@@ -330,12 +331,18 @@ export function UserProfileClient({ user, location, countryParam }: Props) {
330331
{copied ? (
331332
<>
332333
<Check className="h-4 w-4 shrink-0 text-green-500" />
333-
<span className="truncate text-green-500">{t("profile.copied")}</span>
334+
<span className="truncate text-green-500 sm:hidden">
335+
{t("profile.copiedShort")}
336+
</span>
337+
<span className="hidden truncate text-green-500 sm:inline">
338+
{t("profile.copied")}
339+
</span>
334340
</>
335341
) : (
336342
<>
337343
<Copy className="h-4 w-4 shrink-0" />
338-
<span className="truncate">{t("profile.copyLink")}</span>
344+
<span className="truncate sm:hidden">{t("profile.shareShort")}</span>
345+
<span className="hidden truncate sm:inline">{t("profile.copyLink")}</span>
339346
</>
340347
)}
341348
</Button>

locales/ar.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,12 @@
256256
"profile.backToLeaderboard": "تصفح لوحات الصدارة",
257257
"profile.breadcrumbs.home": "الرئيسية",
258258
"profile.breadcrumbs.leaderboards": "لوحات الصدارة",
259+
"profile.compareShort": "مقارنة",
259260
"profile.compareWith": "مقارنة مع مطور آخر",
260261
"profile.copied": "تم نسخ الرابط!",
262+
"profile.copiedShort": "تم النسخ!",
261263
"profile.copyLink": "مشاركة الملف الشخصي",
264+
"profile.shareShort": "مشاركة",
262265
"profile.directStats": "تحليلات التأثير الفردي",
263266
"profile.header.eyebrow": "الملف الشخصي للمطور",
264267
"profile.loading": "جاري تحميل الملف الشخصي للمطور...",

locales/en.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,12 @@
256256
"profile.backToLeaderboard": "Browse Leaderboards",
257257
"profile.breadcrumbs.home": "Home",
258258
"profile.breadcrumbs.leaderboards": "Leaderboards",
259+
"profile.compareShort": "Compare",
259260
"profile.compareWith": "Compare with another developer",
260261
"profile.copied": "Link Copied!",
262+
"profile.copiedShort": "Copied!",
261263
"profile.copyLink": "Share Profile",
264+
"profile.shareShort": "Share",
262265
"profile.directStats": "Individual Impact Analytics",
263266
"profile.header.eyebrow": "Developer Profile",
264267
"profile.loading": "Loading developer profile...",

0 commit comments

Comments
 (0)