export function getInitialName(name: string) {
  if (!name) return;

  const arrName = name.trim().split(' '); // Split the name into words

  if (arrName.length === 1) {
    return arrName[0].split('').slice(0, 2).join(''); // Take at most the first 3 initials
  }

  return arrName
    .map((word) => word[0]?.toUpperCase()) // Take the first letter of each word and make it uppercase
    .slice(0, 2) // Take at most the first 3 initials
    .join(''); // Join them together to form initials
}
