Skip to content

Commit

Permalink
Merge pull request #27 from VelaSam/improvement-favorite-button
Browse files Browse the repository at this point in the history
removed new badge from favorite button + aesthetic detail
  • Loading branch information
imrashb authored May 27, 2024
2 parents 7bd126a + b05687f commit aacdb90
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/components/NavBar/NavBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default function NavBar() {
label={isSmallViewport ? undefined : (
<>
{t(tab.label)}
{tab.new && <NewBadge />}
{tab.new}
</>
)}
/>
Expand Down
18 changes: 7 additions & 11 deletions src/pages/GenerateurHoraire/Combinaisons/FavoriteButton.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Favorite } from '@mui/icons-material';
import { Favorite, FavoriteBorder } from '@mui/icons-material';
import { Badge, IconButton } from '@mui/material';
import React from 'react';
import { arrayRemove, arrayUnion, setDoc } from 'firebase/firestore';
Expand Down Expand Up @@ -39,16 +39,12 @@ function FavoriteButton({ combinaison }) {
};

return (
<Badge badgeContent={t('badgeNew')} color="badgeNew">
{' '}
<IconButton
color={isFavorited ? 'primary' : undefined}
onClick={handleFavorite}
>
<Favorite />
</IconButton>
</Badge>

<IconButton
color={isFavorited ? 'primary' : undefined}
onClick={handleFavorite}
>
{isFavorited ? <Favorite /> : <FavoriteBorder />}
</IconButton>
);
}

Expand Down

0 comments on commit aacdb90

Please sign in to comment.