From dd261990be3e1c50eeb74f0280a03bcebafec9d1 Mon Sep 17 00:00:00 2001 From: Gurikov Maxim Date: Tue, 5 Nov 2024 22:30:04 +0500 Subject: [PATCH] fixes to codestyle --- src/components/offer/offer-gallery.tsx | 2 +- src/components/offer/offer-inside-items.tsx | 4 +++- src/components/reviews/reviews.tsx | 2 +- src/dataTypes/enums/authorization-status.ts | 2 +- src/dataTypes/location.ts | 2 +- src/utils/string-utils.ts | 2 +- 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/components/offer/offer-gallery.tsx b/src/components/offer/offer-gallery.tsx index 27311fc..a1047be 100644 --- a/src/components/offer/offer-gallery.tsx +++ b/src/components/offer/offer-gallery.tsx @@ -11,7 +11,7 @@ export function OfferGallery({
{imageSources.map((src) => ( -
+
Photo studio
))} diff --git a/src/components/offer/offer-inside-items.tsx b/src/components/offer/offer-inside-items.tsx index b8aac6b..793f717 100644 --- a/src/components/offer/offer-inside-items.tsx +++ b/src/components/offer/offer-inside-items.tsx @@ -12,7 +12,9 @@ export function OfferInsideItems({

What's inside

    {items.map((item) => ( -
  • {item}
  • +
  • + {item} +
  • ))}
diff --git a/src/components/reviews/reviews.tsx b/src/components/reviews/reviews.tsx index ffd4c13..5578d04 100644 --- a/src/components/reviews/reviews.tsx +++ b/src/components/reviews/reviews.tsx @@ -7,7 +7,7 @@ interface ReviewsProps { } export function Reviews({ reviews }: ReviewsProps): React.JSX.Element { - const reviewsAvailable = reviews && reviews.length != 0; + const reviewsAvailable = reviews && reviews.length !== 0; return (
{reviewsAvailable ? ( diff --git a/src/dataTypes/enums/authorization-status.ts b/src/dataTypes/enums/authorization-status.ts index 3e0b810..b24c350 100644 --- a/src/dataTypes/enums/authorization-status.ts +++ b/src/dataTypes/enums/authorization-status.ts @@ -1,5 +1,5 @@ export enum AuthorizationStatus { Authorized, Unauthorized, - Unknown + Unknown, } diff --git a/src/dataTypes/location.ts b/src/dataTypes/location.ts index 5cd6bac..39692f0 100644 --- a/src/dataTypes/location.ts +++ b/src/dataTypes/location.ts @@ -2,4 +2,4 @@ export type Location = { latitude: number; longitude: number; zoom: number; -} +}; diff --git a/src/utils/string-utils.ts b/src/utils/string-utils.ts index 03697b3..f5f0347 100644 --- a/src/utils/string-utils.ts +++ b/src/utils/string-utils.ts @@ -6,7 +6,7 @@ export function pluralize(value: string, count: number): string { if (count === 1) { return value; } - return value + 's'; + return `${value}s`; } export function pluralizeAndCombine(value: string, count: number): string {