Skip to content

Commit

Permalink
fix: sort button not displaying the selected option (#1297) (#1310)
Browse files Browse the repository at this point in the history
  • Loading branch information
rishabhbizzle authored Jan 1, 2024
1 parent 32abab9 commit 1183c72
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
7 changes: 2 additions & 5 deletions src/screens/OrgPost/OrgPost.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -253,12 +253,9 @@ function orgPost(): JSX.Element {
title="Sort Post"
data-testid="sort"
>
<Dropdown.Toggle
variant="outline-success"
data-testid="sortpost"
>
<Dropdown.Toggle variant="success" data-testid="sortpost">
<SortIcon className={'me-1'} />
{t('sortPost')}
{sortingOption === 'latest' ? t('Latest') : t('Oldest')}
</Dropdown.Toggle>
<Dropdown.Menu>
<Dropdown.Item
Expand Down
7 changes: 2 additions & 5 deletions src/screens/Users/Users.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -266,12 +266,9 @@ const Users = (): JSX.Element => {
title="Sort Users"
data-testid="sort"
>
<Dropdown.Toggle
variant="outline-success"
data-testid="sortUsers"
>
<Dropdown.Toggle variant="success" data-testid="sortUsers">
<SortIcon className={'me-1'} />
{t('sort')}
{sortingOption === 'newest' ? t('Newest') : t('Oldest')}
</Dropdown.Toggle>
<Dropdown.Menu>
<Dropdown.Item
Expand Down

0 comments on commit 1183c72

Please sign in to comment.