Files
textbee/web/config/external-links.ts
isra el 6f5190aade feat(web): prefill Polar customer portal with user email
Add polarCustomerPortalRequestUrl() pointing to /portal/request with a
URL-encoded email query when available. Wire Manage Subscription links in
account settings and subscription info; subscription info loads currentUser
via whoAmI (shared React Query cache with account settings).

Made-with: Cursor
2026-04-05 17:34:14 +03:00

20 lines
656 B
TypeScript

const POLAR_CUSTOMER_PORTAL_REQUEST_BASE =
'https://polar.sh/textbee/portal/request'
export function polarCustomerPortalRequestUrl(
email?: string | null
): string {
const trimmed = email?.trim()
if (!trimmed) return POLAR_CUSTOMER_PORTAL_REQUEST_BASE
return `${POLAR_CUSTOMER_PORTAL_REQUEST_BASE}?email=${encodeURIComponent(trimmed)}`
}
export const ExternalLinks = {
patreon: 'https://patreon.com/vernu',
github: 'https://github.com/vernu/textbee',
discord: 'https://discord.gg/d7vyfBpWbQ',
polar: 'https://donate.textbee.dev',
twitter: 'https://x.com/textbeedotdev',
linkedin: 'https://www.linkedin.com/company/textbeedotdev',
}