-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(utils): update isValidPhone to don't be equal to call center pho…
…ne number
- Loading branch information
Showing
4 changed files
with
28 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,7 @@ | ||
import { callCenterPhone } from '@/constants/phoneNumber'; | ||
import { callCenterPhone, callCenterPhoneTrimmed } from '@/constants/phoneNumber'; | ||
|
||
export const CallCenterLink = () => { | ||
const formattedPhone = callCenterPhone.replace(/\s/g, ''); | ||
|
||
return ( | ||
<a className="font-bold text-blue-600 hover:text-blue-800" href={`tel:+34${formattedPhone}`}> | ||
{callCenterPhone} | ||
</a> | ||
); | ||
}; | ||
export const CallCenterLink = () => ( | ||
<a className="font-bold text-blue-600 hover:text-blue-800" href={`tel:+34${callCenterPhoneTrimmed}`}> | ||
{callCenterPhone} | ||
</a> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
export const callCenterPhone = '626 675 591'; | ||
|
||
export const callCenterPhoneTrimmed = callCenterPhone.replace(/\s/g, ''); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters