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

Boda Alexandru #6

Open
wants to merge 21 commits into
base: boda-alexandru
Choose a base branch
from

Conversation

BodaAlex
Copy link

No description provided.

Copy link
Member

@alexonaci alexonaci left a comment

Choose a reason for hiding this comment

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

Minor improvements can be added
I like the idea with the markup in javascript
Nice that you used localStorage and fetch
GG ;)

@@ -0,0 +1,88 @@
<html>
Copy link
Member

Choose a reason for hiding this comment

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

html/index.html Outdated
</div>
</div>
<footer>
<div class="footer-left">
Copy link
Member

Choose a reason for hiding this comment

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

it usually is better to name the classes by what they do in the app not by where there are placed (left, right) because the design might change or the view might be changed on mobile
you can put something like '.contact-list', '.contact-links', '.footer-description' or '.footer .description'

const fetchURL = "http://localhost:3000/products";

const fetchData = () => {
fetch(fetchURL)
Copy link
Member

Choose a reason for hiding this comment

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

nice that you use fetch ;)

let displayData = JSON.parse(localStorage.getItem("fetchedData"));

const display = () => {
displayData.map((el) => {
Copy link
Member

Choose a reason for hiding this comment

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

maybe we can use foreach if we don't do anything with the returning array?


const display = () => {
displayData.map((el) => {
if (el.id == clickedId) {
Copy link
Member

Choose a reason for hiding this comment

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

<div class="product-right">
<div class="product-right-top">
<h3>
${el.name}
Copy link
Member

Choose a reason for hiding this comment

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

nice use of backticks 😁

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