Skip to content

Commit

Permalink
fixed item not found message
Browse files Browse the repository at this point in the history
  • Loading branch information
samiulislam09 committed Mar 2, 2022
1 parent 051d37a commit fcd5923
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ const displayPhone = (data) => {
<div class="card g-2" style="width: 95%;">
<img src="${item.image}" class="card-img-top" alt="${item.brand} mobile image">
<div class="card-body">
<h5 class="card-title">Brand name: ${item.brand}</h5>
<p class="card-text">Model: ${item.phone_name}</p>
<p class="card-text">Model: ${item.phone_name}</p>
<h5 class="card-title">Brand: ${item.brand}</h5>
<button class="btn btn-primary" id = "show-more-btn" onclick="loadDetail('${item.slug}')">Specification</button>
</div>
</div>
Expand All @@ -68,6 +68,7 @@ const loadDetail = (id) => {
};
// phone spec detail section
const specDetails = (data) => {
console.log(data);
const featureSection = document.getElementById('feature');
featureSection.style.display = 'block'
const div = document.createElement('div');
Expand All @@ -92,12 +93,12 @@ const specDetails = (data) => {
<p><span>Memory: </span>${data.mainFeatures.memory}</p>
<p><span>Sensors: </span>${data.mainFeatures.sensors}</p>
<p><span>Others</span></p>
<p><span>WLAN: </span>${data.others.WLAN ? data.others.WLAN:"not available"}</p>
<p><span>Bluetooth: </span>${data.others.Bluetooth?data.others.Bluetooth:"Not avaolable"}</p>
<p><span>GPS: </span>${data.others.GPS?data.others.GPS:"Not available"}</p>
<p><span>NFC: </span>${data.others.NFC ? data.others.NFC:"not availbale"}</p>
<p><span>Radio: </span>${data.others.Radio ? data.others.Radio:"not available"}</p>
<p><span>USB: </span>${data.others.USB ? data.others.USB:"not available"}</p>
<p><span>WLAN: </span>${data.others?.WLAN ? data.others.WLAN:"not available"}</p>
<p><span>Bluetooth: </span>${data.others?.Bluetooth?data.others.Bluetooth:"Not avaolable"}</p>
<p><span>GPS: </span>${data.others?.GPS?data.others.GPS:"Not available"}</p>
<p><span>NFC: </span>${data.others?.NFC ? data.others.NFC:"not availbale"}</p>
<p><span>Radio: </span>${data.others?.Radio ? data.others.Radio:"not available"}</p>
<p><span>USB: </span>${data.others?.USB ? data.others.USB:"not available"}</p>
<p><span>Release Date: </span>${data.releaseDate?data.releaseDate : 'not available'}</p>
</div>
</div>
Expand Down

0 comments on commit fcd5923

Please sign in to comment.