mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-07-04 13:35:22 +02:00
lint: formatted changes using biome
This commit is contained in:
@@ -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) => (
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user