Skip to content

Commit

Permalink
Merge branch 'nk-important-lists-on-top' into nk-delete-a-list
Browse files Browse the repository at this point in the history
  • Loading branch information
kweeuhree committed Oct 15, 2024
2 parents 729bd24 + 74fd8a8 commit 42869e3
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/components/SingleList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,7 @@ export function SingleList({
open: open,
};

const tooltipTitle = isImportant ? 'Pinned' : 'Not pinned';

const iconButtonAreaLabel = isImportant ? 'Pin list' : 'Unpin list';
const importantStatusLabel = isImportant ? 'Unpin list' : 'Pin list';

return (
<>
Expand All @@ -95,14 +93,14 @@ export function SingleList({
onMouseLeave={() => setIsHovered(false)}
>
<Tooltip
title={<p style={tooltipStyle}>{tooltipTitle}</p>}
title={<p style={tooltipStyle}>{importantStatusLabel}</p>}
placement="left"
arrow
>
<IconButton
onClick={handleImportantList}
sx={{ color: 'white' }}
aria-label={iconButtonAreaLabel}
aria-label={importantStatusLabel}
>
{isImportant ? (
<PushPin fontSize="large" />
Expand Down

0 comments on commit 42869e3

Please sign in to comment.