Skip to content

Conversation

@jaaaaavier
Copy link
Contributor

This PR introduces new LP for influencers 'qinhui' and 'ct3003', each one with his own coupon code and an specific language defined

@vercel
Copy link

vercel bot commented Dec 11, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
website Ready Ready Preview Comment Dec 11, 2025 2:01pm

@jaaaaavier jaaaaavier self-assigned this Dec 11, 2025
@jaaaaavier jaaaaavier added the enhancement New feature or request label Dec 11, 2025
@jaaaaavier jaaaaavier requested a review from xabg2 December 11, 2025 08:10
let lang = 'es';

if (pathname === 'believemy' || pathname === 'madroz' || pathname === 'justin') {
if (pathname === 'believemy' || pathname === 'madroz' || pathname === 'justin' || pathname === 'qinhui') {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's time to create an array and use the magic includes 😄 More info here.

}

if (pathname === 'apfelcast') {
if (pathname === 'apfelcast' || pathname === 'ct3003') {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, i refactored the language application logic by replacing multiple if-else statements with a cleaner object mapping approach.
Instead of checking each pathname individually, we now use a single lookup object that maps pathnames to their languages, with Spanish as the fallback default using LANG_MAP[pathname] || 'es'.

[MKT-682]:fix/Coupons & Drive Page
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@jaaaaavier jaaaaavier merged commit 55a191a into main Dec 11, 2025
9 of 10 checks passed
@jaaaaavier jaaaaavier deleted the influencers-LPs branch December 11, 2025 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants