Skip to content

Commit

Permalink
Fix code identation and comment out console.logs
Browse files Browse the repository at this point in the history
  • Loading branch information
catherinepapad committed Dec 31, 2023
1 parent 744a7ad commit 3c678bc
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 21 deletions.
2 changes: 1 addition & 1 deletion web-app/src/builder-case.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ document.addEventListener('DOMContentLoaded', function () {
// Add the event listener directly inside the module
caseDropdown.addEventListener('change', function () {
selectedCase = caseDropdown.value;
console.log(selectedCase);
//console.log(selectedCase);
});

export { selectedCase };
2 changes: 1 addition & 1 deletion web-app/src/builder-cpu.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ document.addEventListener('DOMContentLoaded', function () {
// Add the event listener directly inside the module
cpuDropdown.addEventListener('change', function () {
selectedCpu = cpuDropdown.value;
console.log(selectedCpu);
//console.log(selectedCpu);
});

export { selectedCpu };
2 changes: 1 addition & 1 deletion web-app/src/builder-gpu.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ document.addEventListener('DOMContentLoaded', function () {
// Add the event listener directly inside the module
gpuDropdown.addEventListener('change', function () {
selectedGpu = gpuDropdown.value;
console.log(selectedGpu);
//console.log(selectedGpu);
});

export { selectedGpu };
2 changes: 1 addition & 1 deletion web-app/src/builder-mobo.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ document.addEventListener('DOMContentLoaded', function () {
// Add the event listener directly inside the module
moboDropdown.addEventListener('change', function () {
selectedMobo = moboDropdown.value;
console.log(selectedMobo);
//console.log(selectedMobo);
});

export { selectedMobo };
2 changes: 1 addition & 1 deletion web-app/src/builder-psu.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ document.addEventListener('DOMContentLoaded', function () {
// Add the event listener directly inside the module
psuDropdown.addEventListener('change', function () {
selectedPsu = psuDropdown.value;
console.log(selectedPsu);
//console.log(selectedPsu);
});

export { selectedPsu };
2 changes: 1 addition & 1 deletion web-app/src/builder-ram.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ document.addEventListener('DOMContentLoaded', function () {
// Add the event listener directly inside the module
ramDropdown.addEventListener('change', function () {
selectedRam = ramDropdown.value;
console.log(selectedRam);
//console.log(selectedRam);
});

export { selectedRam };
5 changes: 0 additions & 5 deletions web-app/src/builder-storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ document.addEventListener('DOMContentLoaded', function () {
createManufacturerFilter(data);
createCapacityFilter(data);







// Add event listener for the "Add" button
const addButton = document.getElementById('addStorageButton');
Expand Down
20 changes: 10 additions & 10 deletions web-app/src/builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,20 @@ document.addEventListener('DOMContentLoaded', function () {
// Make the POST request
fetch(endpointUrl, requestOptions)
.then(response => {
// Check if the request was successful (status code in the range 200-299)
if (!response.ok) {
throw new Error(`HTTP error! Status: ${response.status}`);
}
// Parse the JSON response
return response.json();
// Check if the request was successful (status code in the range 200-299)
if (!response.ok) {
throw new Error(`HTTP error! Status: ${response.status}`);
}
// Parse the JSON response
return response.json();
})
.then(data => {
// Handle the response data
console.log('Response data:', data);
// Handle the response data
console.log('Response data:', data);
})
.catch(error => {
// Handle errors
console.error('Error:', error);
// Handle errors
console.error('Error:', error);
});

});
Expand Down

0 comments on commit 3c678bc

Please sign in to comment.