-
Notifications
You must be signed in to change notification settings - Fork 12
[MKT-681]:feat/New Influencers LP #1700
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
src/pages/[filename].tsx
Outdated
| let lang = 'es'; | ||
|
|
||
| if (pathname === 'believemy' || pathname === 'madroz' || pathname === 'justin') { | ||
| if (pathname === 'believemy' || pathname === 'madroz' || pathname === 'justin' || pathname === 'qinhui') { |
There was a problem hiding this comment.
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.
src/pages/[filename].tsx
Outdated
| } | ||
|
|
||
| if (pathname === 'apfelcast') { | ||
| if (pathname === 'apfelcast' || pathname === 'ct3003') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
There was a problem hiding this comment.
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
|


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