Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit efb7829

Browse files
Merge pull request #546 from topcoder-platform/issue_168
Issue 168 fix
2 parents 5e91464 + a618ddd commit efb7829

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

client/src/pages/Search/Global.jsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from "react";
22
import PT from "prop-types";
33
import axios from "axios";
4+
import clsx from 'clsx';
45
import FiltersSideMenu from "../../components/FiltersSideMenu";
56
import { ReactComponent as DownArrowIcon } from "../../assets/images/down-arrow.svg";
67
import ProfileCard from "../../components/ProfileCard";
@@ -277,19 +278,19 @@ export default function SearchGlobal({ keyword }) {
277278
{sortByDropdownShown && (
278279
<ul className={style.dropdown}>
279280
<li
280-
className={style.dropdownItem}
281+
className={clsx(style.dropdownItem, orderBy === 'name' && style.selected)}
281282
onClick={() => setOrderBy("name")}
282283
>
283284
Name
284285
</li>
285286
<li
286-
className={style.dropdownItem}
287+
className={clsx(style.dropdownItem, orderBy === 'location' && style.selected)}
287288
onClick={() => setOrderBy("location")}
288289
>
289290
Location
290291
</li>
291292
<li
292-
className={style.dropdownItem}
293+
className={clsx(style.dropdownItem, orderBy === 'isAvailable' && style.selected)}
293294
onClick={() => setOrderBy("isAvailable")}
294295
>
295296
Availability

client/src/pages/Search/style.module.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@
110110
background-color: $blue;
111111
}
112112
}
113+
114+
.selected {
115+
background-color: $blue;
116+
color: $white;
117+
}
113118
}
114119

115120
.sortMode {

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"@hapi/joi": "^16.1.8",
2323
"aws-sdk": "^2.627.0",
2424
"axios": "^0.19.2",
25+
"clsx": "^1.1.1",
2526
"bluebird": "^3.5.1",
2627
"body-parser": "^1.19.0",
2728
"config": "^3.2.4",

0 commit comments

Comments
 (0)