| @@ -65,15 +65,11 @@ | ||
| 65 | 65 | isDomainRegistrationActive && typeof rawSuggestion?.message === 'string' |
| 66 | 66 | ? rawSuggestion.message.replace(/\{\{domain\}\}/g, domain) |
| 67 | 67 | : ''; |
| 68 | 68 | |
| 69 | -export const enhanceDomainSuggestion = (suggestion) => { | |
| 70 | - if (suggestion?.id !== REGISTER_DOMAIN_ID) return suggestion; | |
| 71 | - if (!isDomainRegistrationActive) return null; | |
| 69 | +export const domainOffer = () => { | |
| 70 | + if (!REGISTER_DOMAIN_MESSAGE) return null; | |
| 72 | 71 | return { |
| 73 | - ...suggestion, | |
| 74 | - // The BE marks this as an external link; fall back in case it hasn't yet. | |
| 75 | - type: suggestion.type ?? 'external-link', | |
| 76 | 72 | message: REGISTER_DOMAIN_MESSAGE, |
| 77 | 73 | url: createDomainUrlLink(domainSearchUrl, domain), |
| 78 | 74 | tracking: { domain, position: 'agent-suggestion', type: domainType }, |
| 79 | 75 | }; |