( isSubDomainRouting: boolean, settings: Settings, thread: SerializedThread )
| 2 | import { LINEN_URL } from 'config'; |
| 3 | |
| 4 | export function buildUrl( |
| 5 | isSubDomainRouting: boolean, |
| 6 | settings: Settings, |
| 7 | thread: SerializedThread |
| 8 | ) { |
| 9 | let url = isSubDomainRouting |
| 10 | ? `https://${settings.redirectDomain}/t/${thread.incrementId}` |
| 11 | : `${LINEN_URL}/${settings.prefix}/${settings.communityName}/t/${thread.incrementId}`; |
| 12 | |
| 13 | if (thread.slug) { |
| 14 | url += '/' + thread.slug.toLowerCase(); |
| 15 | } |
| 16 | return url; |
| 17 | } |
no outgoing calls
no test coverage detected