Skip to content

Commit

Permalink
fix2
Browse files Browse the repository at this point in the history
  • Loading branch information
Mayanzev committed Apr 7, 2024
1 parent 75bb2a3 commit 45bce3f
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion src/components/offer-list/offer-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import CityCard from '../city-card/city-card';

type OfferListProps = {
offers: Offer[];
isStandartCardType: boolean
isStandartCardType: boolean;
};

function OfferList({offers, isStandartCardType}: OfferListProps): JSX.Element {
Expand Down
38 changes: 19 additions & 19 deletions src/components/reviews-item/reviews-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,26 @@ type ReviewProps = {
function ReviewItem({review}: ReviewProps): JSX.Element {
return (
<li className="reviews__item">
<div className="reviews__user user">
<div className="reviews__avatar-wrapper user__avatar-wrapper">
<img className="reviews__avatar user__avatar" src={review.avatar} width="54" height="54" alt="Reviews avatar"/>
</div>
<span className="reviews__user-name">
{review.author}
</span>
</div>
<div className="reviews__info">
<div className="reviews__rating rating">
<div className="reviews__stars rating__stars">
<span style={{width: `${(review.rating / 5) * 100}%`}}></span>
<span className="visually-hidden">Rating</span>
<div className="reviews__user user">
<div className="reviews__avatar-wrapper user__avatar-wrapper">
<img className="reviews__avatar user__avatar" src={review.avatar} width="54" height="54" alt="Reviews avatar"/>
</div>
</div>
<p className="reviews__text">
{review.comment}
</p>
<time className="reviews__time" dateTime="2019-04-24">{review.date}</time>
</div>
<span className="reviews__user-name">
{review.author}
</span>
</div>
<div className="reviews__info">
<div className="reviews__rating rating">
<div className="reviews__stars rating__stars">
<span style={{width: `${(review.rating / 5) * 100}%`}}></span>
<span className="visually-hidden">Rating</span>
</div>
</div>
<p className="reviews__text">
{review.comment}
</p>
<time className="reviews__time" dateTime="2019-04-24">{review.date}</time>
</div>
</li>
);
}
Expand Down
16 changes: 8 additions & 8 deletions src/components/reviews-list/reviews-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ type ReviewsListProps = {
function ReviewsList({ reviews }: ReviewsListProps): JSX.Element {
return (
<section className="offer__reviews reviews">
<h2 className="reviews__title">Reviews &middot; <span className="reviews__amount">{reviews.length}</span></h2>
<ul className="reviews__list">
{reviews.map((review) => (
<ReviewItem key={review.id} review={review} />
))}
</ul>
<CommentForm />
<h2 className="reviews__title">Reviews &middot; <span className="reviews__amount">{reviews.length}</span></h2>
<ul className="reviews__list">
{reviews.map((review) => (
<ReviewItem key={review.id} review={review} />
))}
</ul>
<CommentForm />
</section>
);
}

export default ReviewsList;
export default ReviewsList;
6 changes: 3 additions & 3 deletions src/pages/offer-screen/offer-screen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ function OfferScreen({offer}: OfferScreenProps): JSX.Element {
<div className="offer__container container">
<div className="offer__wrapper">
{offer.isPremium ? (
<div className="offer__mark">
<span>Premium</span>
<div className="offer__mark">
<span>Premium</span>
</div>
) : null}
<div className="offer__name-wrapper">
Expand Down Expand Up @@ -163,7 +163,7 @@ function OfferScreen({offer}: OfferScreenProps): JSX.Element {
</p>
</div>
</div>
<ReviewsList reviews={offer.reviews} ></ReviewsList>
<ReviewsList reviews={offer.reviews} ></ReviewsList>
</div>
</div>
<section className="offer__map map">
Expand Down

0 comments on commit 45bce3f

Please sign in to comment.