(account: accounts)
| 68 | } |
| 69 | |
| 70 | export function serializeSettings(account: accounts): Settings { |
| 71 | const communityType = getCommunityType(account); |
| 72 | |
| 73 | return { |
| 74 | communityId: account.id, |
| 75 | prefix: communityMapping[communityType], |
| 76 | ...(account.redirectDomain && { redirectDomain: account.redirectDomain }), |
| 77 | communityUrl: account.communityUrl || '', |
| 78 | communityInviteUrl: buildInviteUrl(account, communityType), |
| 79 | communityName: getCommunityName(account), |
| 80 | name: account.name, |
| 81 | brandColor: account.brandColor || 'var(--color-navbar)', |
| 82 | homeUrl: account.homeUrl || 'https://linen.dev', |
| 83 | docsUrl: account.docsUrl || 'https://linen.dev', |
| 84 | logoUrl: |
| 85 | account.logoUrl || |
| 86 | 'https://static.main.linendev.com/logos/linen-white-logo.svg', |
| 87 | ...(account.premium && |
| 88 | account.googleAnalyticsId && { |
| 89 | googleAnalyticsId: account.googleAnalyticsId, |
| 90 | }), |
| 91 | communityType: communityType, |
| 92 | ...(!!account.googleSiteVerification && { |
| 93 | googleSiteVerification: account.googleSiteVerification, |
| 94 | }), |
| 95 | chat: (account.chat as ChatType) || null, |
| 96 | }; |
| 97 | } |
no test coverage detected