lint: formatted changes using biome

This commit is contained in:
2025-07-28 23:39:06 +02:00
parent f8261b5364
commit f9210d3165
3 changed files with 19 additions and 11 deletions

View File

@@ -267,9 +267,13 @@ export const ProfileForm = () => {
/>
</FormControl>
<Avatar className="default-avatar h-12 w-12 rounded-full border hover:p-px hover:border-primary transition-transform">
<AvatarFallback className="rounded-lg">{getFallbackAvatarInitials(data?.user?.name)}</AvatarFallback>
</Avatar>
<Avatar className="default-avatar h-12 w-12 rounded-full border hover:p-px hover:border-primary transition-transform">
<AvatarFallback className="rounded-lg">
{getFallbackAvatarInitials(
data?.user?.name,
)}
</AvatarFallback>
</Avatar>
</FormLabel>
</FormItem>
{availableAvatars.map((image) => (

View File

@@ -47,7 +47,9 @@ export const UserNav = () => {
src={data?.user?.image || ""}
alt={data?.user?.image || ""}
/>
<AvatarFallback className="rounded-lg">{getFallbackAvatarInitials(data?.user?.name)}</AvatarFallback>
<AvatarFallback className="rounded-lg">
{getFallbackAvatarInitials(data?.user?.name)}
</AvatarFallback>
</Avatar>
<div className="grid flex-1 text-left text-sm leading-tight">
<span className="truncate font-semibold">Account</span>

View File

@@ -28,11 +28,13 @@ export function formatTimestamp(timestamp: string | number) {
}
}
export function getFallbackAvatarInitials(fullName: string | undefined): string {
if (typeof fullName === "undefined" || fullName === "") return "CN";
const [ name = "", surname = "" ] = fullName.split(" ");
if (surname === "") {
return (name.substring(0,2)).toUpperCase();
}
return (name.charAt(0) + surname.charAt(0)).toUpperCase();
export function getFallbackAvatarInitials(
fullName: string | undefined,
): string {
if (typeof fullName === "undefined" || fullName === "") return "CN";
const [name = "", surname = ""] = fullName.split(" ");
if (surname === "") {
return name.substring(0, 2).toUpperCase();
}
return (name.charAt(0) + surname.charAt(0)).toUpperCase();
}