Skip to content

Commit

Permalink
Fix miscellenous trivial issues
Browse files Browse the repository at this point in the history
Fix miscellenous trivial issues
  • Loading branch information
pkong-ds authored May 30, 2024
2 parents dafb635 + 1b67154 commit 98c4e59
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
15 changes: 9 additions & 6 deletions public/scripts/device.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,14 @@ function initializeSearch(viewModel, containerId) {
});
}

function handleBrandSearchParams(viewModel) {
const urlParams = new URLSearchParams(window.location.search);
const brandParam = urlParams.get("brand");
if (brandParam != null) {
viewModel.selectedBrand = brandParam.toLowerCase();
}
}

function main() {
const deviceGrids = document.querySelectorAll(".device-grid");
const brands = document.querySelectorAll(".device-brand-list__item-button");
Expand Down Expand Up @@ -253,10 +261,5 @@ function main() {
handleSelectBrandOption(brandSelect, viewModel),
);

const urlParams = new URLSearchParams(window.location.search);
const brandParam = urlParams.get("brand");

if (brandParam != null) {
viewModel.selectedBrand = brandParam;
}
handleBrandSearchParams(viewModel);
}
6 changes: 0 additions & 6 deletions src/styles/device.css
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,6 @@
}
}

/* @media (min-width: 576px) {
.device-type-list__item:not(:first-child) {
margin-left: 30px;
}
} */

.device-type-list__circle-image {
display: flex;
justify-content: center;
Expand Down

0 comments on commit 98c4e59

Please sign in to comment.