Skip to content

Commit

Permalink
fixes to codestyle
Browse files Browse the repository at this point in the history
  • Loading branch information
mgmman committed Nov 5, 2024
1 parent 4810517 commit dd26199
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/components/offer/offer-gallery.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export function OfferGallery({
<div className="offer__gallery-container container">
<div className="offer__gallery">
{imageSources.map((src) => (
<div className="offer__image-wrapper">
<div key={`${src}`} className="offer__image-wrapper">
<img className="offer__image" src={src} alt="Photo studio" />
</div>
))}
Expand Down
4 changes: 3 additions & 1 deletion src/components/offer/offer-inside-items.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ export function OfferInsideItems({
<h2 className="offer__inside-title">What&apos;s inside</h2>
<ul className="offer__inside-list">
{items.map((item) => (
<li className="offer__inside-item">{item}</li>
<li key={item} className="offer__inside-item">
{item}
</li>
))}
</ul>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/reviews/reviews.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<section className="offer__reviews reviews">
{reviewsAvailable ? (
Expand Down
2 changes: 1 addition & 1 deletion src/dataTypes/enums/authorization-status.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export enum AuthorizationStatus {
Authorized,
Unauthorized,
Unknown
Unknown,
}
2 changes: 1 addition & 1 deletion src/dataTypes/location.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export type Location = {
latitude: number;
longitude: number;
zoom: number;
}
};
2 changes: 1 addition & 1 deletion src/utils/string-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit dd26199

Please sign in to comment.