Skip to content

Commit

Permalink
modal card navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
YagovkinDmytro committed May 23, 2024
1 parent ccdebce commit 09f77ef
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
9 changes: 6 additions & 3 deletions src/components/CardItem/CardItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import CategoriesItemList from 'components/CategoriesItemList/CategoriesItemList
import ButtonCardItems from 'components/ButtonCardItems/ButtonCardItems';
import css from './CardItem.module.css';
import { addFavoriteCardId } from '../../redux/favoritesSlice';
import { Link } from 'react-router-dom';

const CardItem = () => {
const infoCardCampers = useSelector(selectInfoCardCampers);
Expand Down Expand Up @@ -89,9 +90,11 @@ const CardItem = () => {
/>
</div>
</div>
<ButtonCardItems id={_id} type="button" variant="button-show-more">
Show more
</ButtonCardItems>
<Link to={'/catalog/feature'}>
<ButtonCardItems id={_id} type="button" variant="button-show-more">
Show more
</ButtonCardItems>
</Link>
</div>
</li>
)
Expand Down
2 changes: 1 addition & 1 deletion src/components/ModalCardDetails/ModalCardDetails.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const ModalCardDetails = () => {
className={css['close-modal-button']}
onClick={handleSetCloseModal}
>
<Link to={previousLocation.current}>
<Link to={'/catalog'}>
<CloseIcon width={32} height={32}></CloseIcon>
</Link>
</button>
Expand Down
3 changes: 2 additions & 1 deletion src/pages/Reviews/Reviews.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import css from './reviews.module.css';
import { ReactComponent as Star } from '../../images/icons/star.svg';
import { selectInfoModalDetails } from '../../redux/selectors';
import { useSelector } from 'react-redux';
import { nanoid } from '@reduxjs/toolkit';

const Reviews = () => {
const dataDetailsInfo = useSelector(selectInfoModalDetails);
Expand All @@ -19,7 +20,7 @@ const Reviews = () => {
};

return (
<div className={css['container-reviews']}>
<div key={nanoid()} className={css['container-reviews']}>
<div className={css['container-info']}>
<div className={css['image-container']}>
<h2 className={css['name-letter']}>{capitalizedLetter}</h2>
Expand Down

0 comments on commit 09f77ef

Please sign in to comment.