From cc02a0ddc38c87e8cd2e834980a4c2b490ad9946 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=93=D1=83=D1=80=D0=B8=D0=BA=D0=BE=D0=B2=20=D0=9C=D0=B0?= =?UTF-8?q?=D0=BA=D1=81=D0=B8=D0=BC?= Date: Tue, 22 Oct 2024 19:48:39 +0500 Subject: [PATCH] fixed naming --- .../{FavoritesPage.tsx => favorites-page.tsx} | 6 +++--- src/Pages/{LoginPage.tsx => login-page.tsx} | 0 src/Pages/{MainPage.tsx => main-page.tsx} | 6 +++--- .../not-found-page.module.css} | 0 .../not-found-page.tsx} | 2 +- src/Pages/{OfferPage.tsx => offer-page.tsx} | 6 +++--- src/components/{App.tsx => app.tsx} | 16 ++++++++-------- ...tionWrapper.tsx => authorization-wrapper.tsx} | 0 src/components/{Layout.tsx => layout.tsx} | 2 +- .../offer/{OfferCard.tsx => offer-card.tsx} | 4 ++-- .../offer/{OfferGroup.tsx => offer-group.tsx} | 4 ++-- .../offer/{OffersList.tsx => offers-list.tsx} | 4 ++-- .../{ReviewForm.tsx => review-form.tsx} | 0 src/dataTypes/{City.ts => city.ts} | 2 +- .../enums/{AppRoutes.ts => app-routes.ts} | 0 ...rizationStatus.ts => authorization-status.ts} | 0 .../enums/{RoomType.ts => room-type.ts} | 0 src/dataTypes/{Location.ts => location.ts} | 0 src/dataTypes/{Offer.ts => offer.ts} | 6 +++--- src/index.tsx | 2 +- src/mocks/offers.ts | 4 ++-- 21 files changed, 32 insertions(+), 32 deletions(-) rename src/Pages/{FavoritesPage.tsx => favorites-page.tsx} (86%) rename src/Pages/{LoginPage.tsx => login-page.tsx} (100%) rename src/Pages/{MainPage.tsx => main-page.tsx} (95%) rename src/Pages/{NotFoundPage/NotFoundPage.module.css => not-found-page/not-found-page.module.css} (100%) rename src/Pages/{NotFoundPage/NotFoundPage.tsx => not-found-page/not-found-page.tsx} (91%) rename src/Pages/{OfferPage.tsx => offer-page.tsx} (97%) rename src/components/{App.tsx => app.tsx} (66%) rename src/components/{AuthorizationWrapper.tsx => authorization-wrapper.tsx} (100%) rename src/components/{Layout.tsx => layout.tsx} (97%) rename src/components/offer/{OfferCard.tsx => offer-card.tsx} (94%) rename src/components/offer/{OfferGroup.tsx => offer-group.tsx} (85%) rename src/components/offer/{OffersList.tsx => offers-list.tsx} (90%) rename src/components/{ReviewForm.tsx => review-form.tsx} (100%) rename src/dataTypes/{City.ts => city.ts} (60%) rename src/dataTypes/enums/{AppRoutes.ts => app-routes.ts} (100%) rename src/dataTypes/enums/{AuthorizationStatus.ts => authorization-status.ts} (100%) rename src/dataTypes/enums/{RoomType.ts => room-type.ts} (100%) rename src/dataTypes/{Location.ts => location.ts} (100%) rename src/dataTypes/{Offer.ts => offer.ts} (63%) diff --git a/src/Pages/FavoritesPage.tsx b/src/Pages/favorites-page.tsx similarity index 86% rename from src/Pages/FavoritesPage.tsx rename to src/Pages/favorites-page.tsx index f9a438d..efab44e 100644 --- a/src/Pages/FavoritesPage.tsx +++ b/src/Pages/favorites-page.tsx @@ -1,7 +1,7 @@ import { Helmet } from 'react-helmet-async'; -import { Layout } from '../components/Layout.tsx'; -import { OfferGroup } from '../components/offer/OfferGroup.tsx'; -import { Offer } from '../dataTypes/Offer.ts'; +import { Layout } from '../components/layout.tsx'; +import { OfferGroup } from '../components/offer/offer-group.tsx'; +import { Offer } from '../dataTypes/offer.ts'; interface FavoritesPageProps { offers: Offer[]; diff --git a/src/Pages/LoginPage.tsx b/src/Pages/login-page.tsx similarity index 100% rename from src/Pages/LoginPage.tsx rename to src/Pages/login-page.tsx diff --git a/src/Pages/MainPage.tsx b/src/Pages/main-page.tsx similarity index 95% rename from src/Pages/MainPage.tsx rename to src/Pages/main-page.tsx index ce54cc8..44d9244 100644 --- a/src/Pages/MainPage.tsx +++ b/src/Pages/main-page.tsx @@ -1,7 +1,7 @@ import React, { useState } from 'react'; -import { Offer } from '../dataTypes/Offer.ts'; -import { OffersList } from '../components/offer/OffersList.tsx'; -import { Layout } from '../components/Layout.tsx'; +import { Offer } from '../dataTypes/offer.ts'; +import { OffersList } from '../components/offer/offers-list.tsx'; +import { Layout } from '../components/layout.tsx'; import { Helmet } from 'react-helmet-async'; import { Nullable } from 'vitest'; diff --git a/src/Pages/NotFoundPage/NotFoundPage.module.css b/src/Pages/not-found-page/not-found-page.module.css similarity index 100% rename from src/Pages/NotFoundPage/NotFoundPage.module.css rename to src/Pages/not-found-page/not-found-page.module.css diff --git a/src/Pages/NotFoundPage/NotFoundPage.tsx b/src/Pages/not-found-page/not-found-page.tsx similarity index 91% rename from src/Pages/NotFoundPage/NotFoundPage.tsx rename to src/Pages/not-found-page/not-found-page.tsx index 28d5664..ce3c619 100644 --- a/src/Pages/NotFoundPage/NotFoundPage.tsx +++ b/src/Pages/not-found-page/not-found-page.tsx @@ -1,5 +1,5 @@ import { Link } from 'react-router-dom'; -import styles from './NotFoundPage.module.css'; +import styles from './not-found-page.module.css'; import { Helmet } from 'react-helmet-async'; export function NotFoundPage(): React.JSX.Element { diff --git a/src/Pages/OfferPage.tsx b/src/Pages/offer-page.tsx similarity index 97% rename from src/Pages/OfferPage.tsx rename to src/Pages/offer-page.tsx index 044c452..a671867 100644 --- a/src/Pages/OfferPage.tsx +++ b/src/Pages/offer-page.tsx @@ -1,8 +1,8 @@ import { Helmet } from 'react-helmet-async'; -import { Layout } from '../components/Layout.tsx'; -import { OffersList } from '../components/offer/OffersList.tsx'; +import { Layout } from '../components/layout.tsx'; +import { OffersList } from '../components/offer/offers-list.tsx'; import { offerMocks } from '../mocks/offers.ts'; -import { ReviewForm } from '../components/ReviewForm.tsx'; +import { ReviewForm } from '../components/review-form.tsx'; export function OfferPage(): React.JSX.Element { return ( diff --git a/src/components/App.tsx b/src/components/app.tsx similarity index 66% rename from src/components/App.tsx rename to src/components/app.tsx index 6f8721f..58fd7f6 100644 --- a/src/components/App.tsx +++ b/src/components/app.tsx @@ -1,13 +1,13 @@ -import { MainPage } from '../Pages/MainPage.tsx'; +import { MainPage } from '../pages/main-page.tsx'; import { BrowserRouter, Route, Routes } from 'react-router-dom'; -import { LoginPage } from '../Pages/LoginPage.tsx'; -import { FavoritesPage } from '../Pages/FavoritesPage.tsx'; -import { OfferPage } from '../Pages/OfferPage.tsx'; -import { NotFoundPage } from '../Pages/NotFoundPage/NotFoundPage.tsx'; -import { AuthorizationWrapper } from './AuthorizationWrapper.tsx'; -import { AppRoutes } from '../dataTypes/enums/AppRoutes.ts'; +import { LoginPage } from '../pages/login-page.tsx'; +import { FavoritesPage } from '../pages/favorites-page.tsx'; +import { OfferPage } from '../pages/offer-page.tsx'; +import { NotFoundPage } from '../pages/not-found-page/not-found-page.tsx'; +import { AuthorizationWrapper } from './authorization-wrapper.tsx'; +import { AppRoutes } from '../dataTypes/enums/app-routes.ts'; import { HelmetProvider } from 'react-helmet-async'; -import { Offer } from '../dataTypes/Offer.ts'; +import { Offer } from '../dataTypes/offer.ts'; interface AppProps { offers: Offer[]; diff --git a/src/components/AuthorizationWrapper.tsx b/src/components/authorization-wrapper.tsx similarity index 100% rename from src/components/AuthorizationWrapper.tsx rename to src/components/authorization-wrapper.tsx diff --git a/src/components/Layout.tsx b/src/components/layout.tsx similarity index 97% rename from src/components/Layout.tsx rename to src/components/layout.tsx index 22f3b83..21bdb6d 100644 --- a/src/components/Layout.tsx +++ b/src/components/layout.tsx @@ -1,4 +1,4 @@ -import { AppRoutes } from '../dataTypes/enums/AppRoutes.ts'; +import { AppRoutes } from '../dataTypes/enums/app-routes.ts'; import { Link } from 'react-router-dom'; interface LayoutProps { diff --git a/src/components/offer/OfferCard.tsx b/src/components/offer/offer-card.tsx similarity index 94% rename from src/components/offer/OfferCard.tsx rename to src/components/offer/offer-card.tsx index 3c212a0..b728c02 100644 --- a/src/components/offer/OfferCard.tsx +++ b/src/components/offer/offer-card.tsx @@ -1,6 +1,6 @@ -import { RoomType } from '../../dataTypes/enums/RoomType.ts'; +import { RoomType } from '../../dataTypes/enums/room-type.ts'; import { Link } from 'react-router-dom'; -import { AppRoutes } from '../../dataTypes/enums/AppRoutes.ts'; +import { AppRoutes } from '../../dataTypes/enums/app-routes.ts'; interface PlaceCardProps { id: string; diff --git a/src/components/offer/OfferGroup.tsx b/src/components/offer/offer-group.tsx similarity index 85% rename from src/components/offer/OfferGroup.tsx rename to src/components/offer/offer-group.tsx index dc5af94..077b834 100644 --- a/src/components/offer/OfferGroup.tsx +++ b/src/components/offer/offer-group.tsx @@ -1,5 +1,5 @@ -import { Offer } from '../../dataTypes/Offer.ts'; -import { OffersList } from './OffersList.tsx'; +import { Offer } from '../../dataTypes/offer.ts'; +import { OffersList } from './offers-list.tsx'; interface OfferGroupProps { cityName: string; diff --git a/src/components/offer/OffersList.tsx b/src/components/offer/offers-list.tsx similarity index 90% rename from src/components/offer/OffersList.tsx rename to src/components/offer/offers-list.tsx index 42bb0a5..4d5e4d6 100644 --- a/src/components/offer/OffersList.tsx +++ b/src/components/offer/offers-list.tsx @@ -1,5 +1,5 @@ -import { Offer } from '../../dataTypes/Offer.ts'; -import { OfferCard } from './OfferCard.tsx'; +import { Offer } from '../../dataTypes/offer.ts'; +import { OfferCard } from './offer-card.tsx'; import React from 'react'; import { Nullable } from 'vitest'; diff --git a/src/components/ReviewForm.tsx b/src/components/review-form.tsx similarity index 100% rename from src/components/ReviewForm.tsx rename to src/components/review-form.tsx diff --git a/src/dataTypes/City.ts b/src/dataTypes/city.ts similarity index 60% rename from src/dataTypes/City.ts rename to src/dataTypes/city.ts index 0b7c648..d60307e 100644 --- a/src/dataTypes/City.ts +++ b/src/dataTypes/city.ts @@ -1,4 +1,4 @@ -import { Location } from './Location.ts'; +import { Location } from './location.ts'; export type City = { name: string; diff --git a/src/dataTypes/enums/AppRoutes.ts b/src/dataTypes/enums/app-routes.ts similarity index 100% rename from src/dataTypes/enums/AppRoutes.ts rename to src/dataTypes/enums/app-routes.ts diff --git a/src/dataTypes/enums/AuthorizationStatus.ts b/src/dataTypes/enums/authorization-status.ts similarity index 100% rename from src/dataTypes/enums/AuthorizationStatus.ts rename to src/dataTypes/enums/authorization-status.ts diff --git a/src/dataTypes/enums/RoomType.ts b/src/dataTypes/enums/room-type.ts similarity index 100% rename from src/dataTypes/enums/RoomType.ts rename to src/dataTypes/enums/room-type.ts diff --git a/src/dataTypes/Location.ts b/src/dataTypes/location.ts similarity index 100% rename from src/dataTypes/Location.ts rename to src/dataTypes/location.ts diff --git a/src/dataTypes/Offer.ts b/src/dataTypes/offer.ts similarity index 63% rename from src/dataTypes/Offer.ts rename to src/dataTypes/offer.ts index f50a7b3..c417e82 100644 --- a/src/dataTypes/Offer.ts +++ b/src/dataTypes/offer.ts @@ -1,6 +1,6 @@ -import { Location } from './Location.ts'; -import { City } from './City.ts'; -import { RoomType } from './enums/RoomType.ts'; +import { Location } from './location.ts'; +import { City } from './city.ts'; +import { RoomType } from './enums/room-type.ts'; export type Offer = { id: string; diff --git a/src/index.tsx b/src/index.tsx index c0b6860..e7a9153 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,6 +1,6 @@ import React from 'react'; import ReactDOM from 'react-dom/client'; -import { App } from './components/App.tsx'; +import { App } from './components/app.tsx'; import { offerMocks } from './mocks/offers.ts'; const root = ReactDOM.createRoot( diff --git a/src/mocks/offers.ts b/src/mocks/offers.ts index 92daeb6..61424c5 100644 --- a/src/mocks/offers.ts +++ b/src/mocks/offers.ts @@ -1,5 +1,5 @@ -import { Offer } from '../dataTypes/Offer.ts'; -import { RoomType } from '../dataTypes/enums/RoomType.ts'; +import { Offer } from '../dataTypes/offer.ts'; +import { RoomType } from '../dataTypes/enums/room-type.ts'; export const offerMocks: Offer[] = [ {