Update carousels, card hover, and IranBay branding.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-10-04 13:21:27 +03:30
co-authored by Cursor
commit 1153e8e78f
178 changed files with 30517 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
import type { AuthUser } from "@/types/auth";
/** Prefer Meshkee English name fields; fall back to cell. */
export function getDisplayName(user: AuthUser | null | undefined): string {
if (!user) return "Admin";
const english = [user.firstNameEn, user.lastNameEn]
.filter(Boolean)
.join(" ")
.trim();
if (english) return english;
const local = [user.firstName, user.lastName].filter(Boolean).join(" ").trim();
if (local && !/[\u0600-\u06FF]/.test(local)) return local;
return user.cellNumber || "User";
}
export function getFirstName(user: AuthUser | null | undefined): string {
if (!user) return "there";
const raw =
user.firstNameEn?.trim() ||
(user.firstName?.trim() && !/[\u0600-\u06FF]/.test(user.firstName)
? user.firstName.trim()
: "");
if (!raw) return "there";
return raw.split(/\s+/)[0] || raw;
}