Skip to content
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

Add indexCustomField to obtain the utm_course from custom_fields #389

Open
wants to merge 4 commits into
base: development
Choose a base branch
from

Conversation

avanegasp
Copy link

image

Copy link

vercel bot commented Nov 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
academy ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 10, 2024 8:29pm

@avanegasp
Copy link
Author

@@ -133,6 +134,7 @@ const NewLead = () => {
if (id) {
bc.marketing().getAcademySingleLead(id)
.then(({ data }) => {
const indexCustomField = availableCourses.map((c) => c.slug).indexOf(data.custom_fields?.utm_course);
Copy link
Collaborator

Choose a reason for hiding this comment

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

You should use the find method, and if you find something, then you shouldn't do the find of the next line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants