Skip to content

Commit

Permalink
feat: set favorited to be the default (top) option in the dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
ajyey committed Jun 22, 2023
1 parent a28aa56 commit 97e7944
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/pages/popup/components/home/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { FASTMAIL_SESSION_KEY } from '../../../../../utils/constants';
export default function HomeComponent() {
const [maskedEmails, setMaskedEmails] = useState<MaskedEmail[]>([]);
const [isLoading, setIsLoading] = useState(true);
const [filterOption, setFilterOption] = useState('all');
const [filterOption, setFilterOption] = useState('favorited');
const [searchQuery, setSearchQuery] = useState('');
// State for keeping track of the count of filtered emails
const [filteredEmailsCount, setFilteredEmailsCount] = useState(0);
Expand Down
14 changes: 7 additions & 7 deletions src/pages/popup/components/home/filter/FilterEmailsDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ function FilterEmailsDropdown({
onFilterChange: (option: string) => void;
}) {
const dropdownItems = [
{
label: 'Favorited',
value: 'Favorited',
icon: (
<FavoriteIcon iconClasses={'fill-mikado-yellow stroke-mikado-yellow'} />
)
},
{
label: 'All',
value: 'All',
Expand All @@ -34,13 +41,6 @@ function FilterEmailsDropdown({
label: 'Deleted',
value: 'Deleted',
icon: <DeletedIcon iconClasses={'stroke-red-500'} />
},
{
label: 'Favorited',
value: 'Favorited',
icon: (
<FavoriteIcon iconClasses={'fill-mikado-yellow stroke-mikado-yellow'} />
)
}
];
// State for the dropdown menu open/close status
Expand Down

0 comments on commit 97e7944

Please sign in to comment.