-
Notifications
You must be signed in to change notification settings - Fork 12
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
added fullstacksherpa folder in participants folder #20
Conversation
const apiUrl = `https://www.dnd5eapi.co/api/conditions/${selectedCondition}`; | ||
|
||
// Make a GET request using fetch | ||
fetch(apiUrl) |
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.
Can you try it with async await ?
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.
Sure,I will.
const descPoints = data.desc.map((point) => `<li>${point}</li>`).join(""); | ||
|
||
resultElement.innerHTML = ` | ||
<h3 class="text-center text-3xl">Description for the <span class="font-bold leading-4 tracking-widest text-purple-600">${selectedCondition} </span>condition</h3> |
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.
Do you have any alternative solution here? Instead of innerHTML method ?
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.
Is it okay to use document.createElement and appendChild instead of using innerHTML??
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.
As @chauchausoup suggested instead of the callbacks maybe using async await will be a better approach.
But looks good.
Thanks for the pr @fullstacksherpa
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.
Overall code seems good and working but as @chauchausoup suggested use async and wait as you are calling from some REST API.
Also, you can try not to add HTML syntax inside JS.
Thank you for the PR
Description
-integrate GET from API https://www.dnd5eapi.co/docs/, using https://developer.mozilla.org/en-US/docs/Web/HTTP
Changes Made
-added fullstacksherpa folder in participants folder and added fullstacksherpa list item in bootcamp.html
Related Issues
issue #13
Resolves #13
Checklist
Additional Information
-all the style are done using tailwindcss framwork.
-fetching data from D&D5eAPI
By submitting this PR, I confirm that