Skip to content

Commit

Permalink
Replace path literal with constant
Browse files Browse the repository at this point in the history
  • Loading branch information
TebyakinaEkaterina committed Aug 16, 2024
1 parent 39bdfcf commit 88f6489
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { Genre } from '@js-camp/core/models/genre';
import { List, ListItem, IconButton, ListItemText } from '@mui/material';
import DeleteIcon from '@mui/icons-material/Delete';

import { PATH_TO_GENRES } from '../../routes';

import styles from './GenresList.module.css';

type Props = {
Expand All @@ -25,7 +27,7 @@ const GenresListComponent: FC<Props> = ({ genres }: Props) => (
</IconButton>
}
component={Link}
to={`/genres/${genre.id}`}
to={`/${PATH_TO_GENRES}/${genre.id}`}
>
<ListItemText primary={genre.name} />
</ListItem>) }
Expand Down

0 comments on commit 88f6489

Please sign in to comment.