From 8606633223f95c92f35a1c6bdc35bde677e76bd6 Mon Sep 17 00:00:00 2001 From: b1ek Date: Thu, 4 May 2023 13:52:30 +1000 Subject: [PATCH 1/2] add type annotations --- .../CardApartament/CardApartament.jsx | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/pairent_frontend_react/src/components/CardApartament/CardApartament.jsx b/pairent_frontend_react/src/components/CardApartament/CardApartament.jsx index 804d4d6..f44cc82 100644 --- a/pairent_frontend_react/src/components/CardApartament/CardApartament.jsx +++ b/pairent_frontend_react/src/components/CardApartament/CardApartament.jsx @@ -1,11 +1,29 @@ import React from 'react'; import './styles/CardApartament.css'; +/** + * + * @param {{ + * results: { + * perimetrs: string, + * rooms: string, + * address: string, + * floor: string, + * floorHouse: string, + * timeToBus: string, + * timeToTrain: string, + * price: string, + * description: string, + * dateCreate: string + * } + * }} props + * @returns + */ const CardApartament = function (props) { return (
- +

{props.results.perimetrs} м², {props.results.rooms}-х комнатная

{props.results.address}, {props.results.floor} этаж из {props.results.floorHouse}

From 012fd67768d75488b4804d948282c62906cf1036 Mon Sep 17 00:00:00 2001 From: b1ek Date: Thu, 4 May 2023 13:52:54 +1000 Subject: [PATCH 2/2] change class property to className --- .../CardApartament/CardApartament.jsx | 46 +++++++++---------- .../src/components/Favorites/Favorites.jsx | 2 +- .../src/components/Footer/Footer.jsx | 4 +- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/pairent_frontend_react/src/components/CardApartament/CardApartament.jsx b/pairent_frontend_react/src/components/CardApartament/CardApartament.jsx index f44cc82..d215136 100644 --- a/pairent_frontend_react/src/components/CardApartament/CardApartament.jsx +++ b/pairent_frontend_react/src/components/CardApartament/CardApartament.jsx @@ -21,28 +21,28 @@ import './styles/CardApartament.css'; */ const CardApartament = function (props) { return ( -
-
+
+
-
+

{props.results.perimetrs} м², {props.results.rooms}-х комнатная

-

{props.results.address}, {props.results.floor} этаж из {props.results.floorHouse}

-
-
+

{props.results.address}, {props.results.floor} этаж из {props.results.floorHouse}

+
+

{props.results.timeToBus} мин

-
+

{props.results.timeToTrain} мин

-
-
+
+
@@ -56,8 +56,8 @@ const CardApartament = function (props) {
-
-
+
+
@@ -72,8 +72,8 @@ const CardApartament = function (props) {
-
-
+
+
@@ -88,26 +88,26 @@ const CardApartament = function (props) {
-
+
{/* TODO: добавить проверку на авторизацию */} - - - -
-
-
+
+

{props.results.price} ₽

-

в месяц

-

{props.results.description}

-

{props.results.dateCreate}

+

в месяц

+

{props.results.description}

+

{props.results.dateCreate}

); diff --git a/pairent_frontend_react/src/components/Favorites/Favorites.jsx b/pairent_frontend_react/src/components/Favorites/Favorites.jsx index 7107488..6b40f60 100644 --- a/pairent_frontend_react/src/components/Favorites/Favorites.jsx +++ b/pairent_frontend_react/src/components/Favorites/Favorites.jsx @@ -21,7 +21,7 @@ const Favorites = function () { {apartaments.map((apartament, index) => <> -
+
)} diff --git a/pairent_frontend_react/src/components/Footer/Footer.jsx b/pairent_frontend_react/src/components/Footer/Footer.jsx index b3f47a8..ec18015 100644 --- a/pairent_frontend_react/src/components/Footer/Footer.jsx +++ b/pairent_frontend_react/src/components/Footer/Footer.jsx @@ -4,7 +4,7 @@ import './styles/Footer.css'; const Footer = function () { return ( ); }