Changeset View
Changeset View
Standalone View
Standalone View
cashtab/src/components/Common/UncontrolledLink.tsx
| Show First 20 Lines • Show All 76 Lines • ▼ Show 20 Lines | |||||
| /** | /** | ||||
| * Domains that will open in a new tab without any modal warning. | * Domains that will open in a new tab without any modal warning. | ||||
| * Matches the hostname with or without a www. prefix, case insensitive. | * Matches the hostname with or without a www. prefix, case insensitive. | ||||
| */ | */ | ||||
| const APPROVED_DOMAINS = [ | const APPROVED_DOMAINS = [ | ||||
| 'agora.cash', | 'agora.cash', | ||||
| 'cashtab.com', | 'cashtab.com', | ||||
| 'firma.cash', | 'firma.cash', | ||||
| 'firmaprotocol.com', | |||||
| 'proofofwriting.com', | 'proofofwriting.com', | ||||
| 'stakedxec.com', | 'stakedxec.com', | ||||
| ]; | ]; | ||||
| const normalizeDomain = (hostname: string): string => { | const normalizeDomain = (hostname: string): string => { | ||||
| const lowerHostname = hostname.toLowerCase(); | const lowerHostname = hostname.toLowerCase(); | ||||
| return lowerHostname.startsWith('www.') | return lowerHostname.startsWith('www.') | ||||
| ? lowerHostname.slice(4) | ? lowerHostname.slice(4) | ||||
| ▲ Show 20 Lines • Show All 65 Lines • Show Last 20 Lines | |||||