From cbd1261a3c7ad6f37b7a93716fe1c784b4ea4188 Mon Sep 17 00:00:00 2001 From: Nikolay Mamaenko Date: Fri, 22 Nov 2024 14:04:16 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=B0=D1=87=D0=B8=D0=BD=D0=B0=D0=B5?= =?UTF-8?q?=D0=BC=20=D0=BF=D1=80=D0=BE=D0=B3=D1=80=D0=B0=D0=BC=D0=BC=D0=B8?= =?UTF-8?q?=D1=80=D0=BE=D0=B2=D0=B0=D1=82=D1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/app/index.tsx | 11 ++ src/components/card/card.tsx | 40 +++++ src/index.tsx | 5 +- src/pages/favorites-page.tsx | 171 ++++++++++++++++++ src/pages/login-page.tsx | 46 +++++ src/pages/main-page.tsx | 120 +++++++++++++ src/pages/offer-page.tsx | 339 +++++++++++++++++++++++++++++++++++ 7 files changed, 731 insertions(+), 1 deletion(-) create mode 100644 src/components/app/index.tsx create mode 100644 src/components/card/card.tsx create mode 100644 src/pages/favorites-page.tsx create mode 100644 src/pages/login-page.tsx create mode 100644 src/pages/main-page.tsx create mode 100644 src/pages/offer-page.tsx diff --git a/src/components/app/index.tsx b/src/components/app/index.tsx new file mode 100644 index 0000000..52651aa --- /dev/null +++ b/src/components/app/index.tsx @@ -0,0 +1,11 @@ +import MainPage from './../../pages/main-page'; + +type AppProps = { + countOffer: number; +}; + +function App(props: AppProps) { + return ; +} + +export default App; diff --git a/src/components/card/card.tsx b/src/components/card/card.tsx new file mode 100644 index 0000000..8f10ab1 --- /dev/null +++ b/src/components/card/card.tsx @@ -0,0 +1,40 @@ +function Card() { + return ( + + ); +} + +export default Card; diff --git a/src/index.tsx b/src/index.tsx index be81a6e..74e1fac 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,12 +1,15 @@ import React from 'react'; import ReactDOM from 'react-dom/client'; +import App from './components/app'; const root = ReactDOM.createRoot( document.getElementById('root') as HTMLElement ); +const COUNT_OFFER = 5; + root.render( -

Hello, World!

+
); diff --git a/src/pages/favorites-page.tsx b/src/pages/favorites-page.tsx new file mode 100644 index 0000000..10b9f89 --- /dev/null +++ b/src/pages/favorites-page.tsx @@ -0,0 +1,171 @@ +function FavoritesPage() { + return ( +
+
+
+ +
+
+ +
+
+
+

Saved listing

+ +
+
+
+ +
+ ); +} + +export default FavoritesPage; diff --git a/src/pages/login-page.tsx b/src/pages/login-page.tsx new file mode 100644 index 0000000..352c74c --- /dev/null +++ b/src/pages/login-page.tsx @@ -0,0 +1,46 @@ +function LoginPage() { + + return ( +
+
+
+
+
+ + 6 cities logo + +
+
+
+
+ +
+
+
+

Sign in

+
+
+ + +
+
+ + +
+ +
+
+
+ +
+
+
+
+ ); +} + +export default LoginPage; diff --git a/src/pages/main-page.tsx b/src/pages/main-page.tsx new file mode 100644 index 0000000..54e2ca7 --- /dev/null +++ b/src/pages/main-page.tsx @@ -0,0 +1,120 @@ +import Card from './../components/card/card'; + +type MainPageProps = { + countOffer: number; +}; + +function MainPage({ countOffer }: MainPageProps) { + const mockArray = new Array(countOffer).fill(1).map((el, idx) => el + idx); + + return ( +
+
+ +
+ +
+

Cities

+ + + +
+
+
+

Places

+ 312 places to stay in Amsterdam + +
+ Sort by + + Popular + + + + +
    +
  • Popular
  • +
  • Price: low to high
  • +
  • Price: high to low
  • +
  • Top rated first
  • +
+
+ +
+ {mockArray.map((idx) => ( + + ))} +
+
+ +
+
+
+
+
+
+
+ ); +} + +export default MainPage; diff --git a/src/pages/offer-page.tsx b/src/pages/offer-page.tsx new file mode 100644 index 0000000..5f57975 --- /dev/null +++ b/src/pages/offer-page.tsx @@ -0,0 +1,339 @@ +function OfferPage() { + return ( +
+
+ +
+ +
+
+
+
+
+ Photo studio +
+
+ Photo studio +
+
+ Photo studio +
+
+ Photo studio +
+
+ Photo studio +
+
+ Photo studio +
+
+
+
+
+
+ Premium +
+
+

+ Beautiful & luxurious studio at great location +

+ +
+
+
+ + Rating +
+ 4.8 +
+
    +
  • + Apartment +
  • +
  • + 3 Bedrooms +
  • +
  • + Max 4 adults +
  • +
+
+ €120 +  night +
+
+

What's inside

+
    +
  • + Wi-Fi +
  • +
  • + Washing machine +
  • +
  • + Towels +
  • +
  • + Heating +
  • +
  • + Coffee machine +
  • +
  • + Baby seat +
  • +
  • + Kitchen +
  • +
  • + Dishwasher +
  • +
  • + Cabel TV +
  • +
  • + Fridge +
  • +
+
+
+

Meet the host

+
+
+ Host avatar +
+ + Angelina + + + Pro + +
+
+

+ A quiet cozy and picturesque that hides behind a a river by the unique lightness of Amsterdam. The building is green and from 18th century. +

+

+ An independent House, strategically located between Rembrand Square and National Opera, but where the bustle of the city comes to rest in this alley flowery and colorful. +

+
+
+
+

Reviews · 1

+
    +
  • +
    +
    + Reviews avatar +
    + + Max + +
    +
    +
    +
    + + Rating +
    +
    +

    + A quiet cozy and picturesque that hides behind a a river by the unique lightness of Amsterdam. The building is green and from 18th century. +

    + +
    +
  • +
+
+ +
+ + + + + + + + + + + + + + +
+ +
+

+ To submit review please make sure to set rating and describe your stay with at least 50 characters. +

+ +
+
+
+
+
+
+
+
+
+

Other places in the neighbourhood

+
+ + + + + +
+
+
+
+
+ ); +} + +export default OfferPage;