0

import data from ‘../data.js’;
const HomeScreen = {
    render: () =>{
        const { product } = data;
        return `
        <ul class=”products”>
        ${product.map( product => `
        <li>
        <div class=”product”>
            <a href=”/#/product/${product.id}”>
             <img src=”${product.image}” alt=”${product.name}”>
                </a>
                 <div class=”product-name”>
                 <a href=”/#/product/1″>
             ${product.name}
              </a>
                </div>
                <div class=”product-brand”>
               ${product.brand}
                </div>
                <div class=”product-price”>
                 ${product.price}
        </div>
          </div>
        </li>

import data from '../data.js';
const HomeScreen = {
    render: () =>{
        const { product } = data;
        return `
        <ul class="products">
        ${product.map( product => `
        <li>
        <div class="product">
            <a href="/#/product/${product.id}">
             <img src="${product.image}" alt="${product.name}">
                </a>
                 <div class="product-name">
                 <a href="/#/product/1">
             ${product.name}
              </a>
                </div>
                <div class="product-brand">
               ${product.brand}
                </div>
                <div class="product-price">
                 ${product.price}
        </div>
          </div>
        </li>

ARA Asked question September 15, 2022