Skip to content

Commit

Permalink
Typo
Browse files Browse the repository at this point in the history
  • Loading branch information
psekan committed Nov 1, 2020
1 parent f1c0d9b commit 35be6b0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions client/src/public/components/PlaceDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ interface PlaceDetailProps {
className?: string;
}

const MAX_FAVORITES = 10;
const VALUES_FOR_MEDIAN = 5;

export function PlaceDetail({ county, id, showSearch, limitTable, className }: PlaceDetailProps) {
const classes = useStyles();
const history = useHistory();
Expand Down Expand Up @@ -96,7 +99,7 @@ export function PlaceDetail({ county, id, showSearch, limitTable, className }: P
<Chip
variant="outlined"
icon={<PeopleAltOutlinedIcon />}
label={data.response ? median(data.response.map(a => a.length).slice(0, 10)) : ''} />
label={data.response ? median(data.response.map(a => a.length).slice(0, VALUES_FOR_MEDIAN)) : ''} />
</Tooltip>
)}
{session.favorites?.some(it => it.county === county && it.entryId === id) ? (
Expand All @@ -108,15 +111,15 @@ export function PlaceDetail({ county, id, showSearch, limitTable, className }: P
</IconButton>
) : (
<Badge
badgeContent={session.favorites && session.favorites.length > 0 ? (5-session.favorites.length) : 5}
badgeContent={session.favorites && session.favorites.length > 0 ? (MAX_FAVORITES-session.favorites.length) : MAX_FAVORITES}
color="primary"
overlap="circle"
>
<IconButton
onClick={() => sessionActions.setFavorite(county, id)}
title={'Pridať do obľúbených'}
color="primary"
disabled={session.favorites ? session.favorites.length >= 5 : false}
disabled={session.favorites ? session.favorites.length >= MAX_FAVORITES : false}
>
<FaceOutlinedIcon />
</IconButton>
Expand Down
2 changes: 1 addition & 1 deletion client/src/public/home/HomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export function HomePage() {
</Typography>

<Typography variant={'body1'} className={classes.contact}>
V prípade otázok nás kontaktuje na <Link href="mailto:[email protected]">[email protected]</Link>.
V prípade otázok nás kontaktujte na <Link href="mailto:[email protected]">[email protected]</Link>.
</Typography>
</div>
);
Expand Down

0 comments on commit 35be6b0

Please sign in to comment.