type NameLike = {
    first_name?: string | null
    last_name?: string | null
}

export const getFullName = <T extends NameLike>(user?: T | null) => {
    const firstName = user?.first_name ?? ""
    const lastName = user?.last_name ?? ""
    return `${firstName} ${lastName}`.trim()
}