Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

493 B
Raw Blame
import urlJoin from 'url-join';

/**
 * Resolve the community profile link for a resource author.
 *
 * Organization-owned resources link to the organization public page
 * (`/marketplace/org/:slug`), while individual users link to the user
 * page (`/marketplace/user/:slug`).
 */
export const resolveCommunityProfileLink = (
  userName: string,
  ownerType?: 'user' | 'organization',
): string =>
  urlJoin(ownerType === 'organization' ? '/marketplace/org' : '/marketplace/user', userName);