From 60b136effd54a26b15a309d69a9052b7ed12b864 Mon Sep 17 00:00:00 2001 From: Alibek Date: Sat, 3 Feb 2024 20:03:03 +0600 Subject: [PATCH] just started rewritig the project, found a lot of fails --- app/about-us/page.tsx | 8 +- app/api/auth/[...nextauth]/route.ts | 91 --------- app/create-report/page.tsx | 3 - app/forgot-password/page.tsx | 7 - app/layout.tsx | 8 +- app/news/[id]/page.tsx | 3 - app/news/page.tsx | 3 - app/page.tsx | 4 +- app/profile/layout.tsx | 3 - app/profile/my-reports/page.tsx | 3 - app/{confirm-email => profile}/page.tsx | 0 app/profile/personal-data/page.tsx | 3 - app/report/[id]/page.tsx | 3 - app/sign-in/page.tsx | 8 +- app/sign-up/page.tsx | 3 - app/statistics/page.tsx | 3 - app/volunteers/page.tsx | 3 - .../Homepage/Homepage.scss => App/App.scss} | 4 +- src/App/App.tsx | 20 +- src/App/Providers.tsx | 11 -- src/App/fonts.scss | 9 + src/App/globals.scss | 23 +-- src/Entities/AuthHeader/AuthHeader.scss | 41 ---- src/Entities/AuthHeader/AuthHeader.tsx | 29 --- .../ChangeLanguage/ChangeLanguage.scss | 61 ------ .../ChangeLanguage/ChangeLanguage.tsx | 50 ----- .../ChangeLanguage/icons/check-icon.svg | 5 - .../icons/chevron-down-icon.svg | 11 -- .../ChangeLanguage/icons/lang-icon.svg | 7 - src/Entities/CustomLink/CustomLink.scss | 7 - src/Entities/CustomLink/CustomLink.tsx | 22 --- src/Entities/GoogleButton/GoogleButton.scss | 19 -- src/Entities/GoogleButton/GoogleButton.tsx | 18 -- .../GoogleButton/icons/google-icon.svg | 13 -- .../InputWithLabel/InputWithLabel.scss | 46 ----- .../InputWithLabel/InputWithLabel.tsx | 63 ------- .../InputWithLabel/icons/eye-icon.svg | 6 - .../InputWithLabel/icons/eye-off-icon.svg | 11 -- src/Entities/NavAuthBtn/NavAuthBtn.scss | 18 -- src/Entities/NavAuthBtn/NavAuthBtn.tsx | 19 -- src/Entities/NewsCard/NewsCard.scss | 2 +- src/Entities/NewsCard/NewsCard.tsx | 2 +- src/Entities/ReviewCard/ReviewCard.scss | 61 ------ src/Entities/ReviewCard/ReviewCard.tsx | 67 ------- .../ReviewCard/icons/calendar-icon.svg | 8 - .../SectionHeader/SectionHeader.scss | 14 +- src/Entities/SectionHeader/SectionHeader.tsx | 22 +++ src/Entities/Switch/Switch.tsx | 67 ------- .../CreateReportMap/CreateReportMap.scss | 31 ---- .../CreateReportMap/CreateReportMap.tsx | 80 -------- src/Features/CreateReportMap/assets/pin.svg | 5 - src/Features/CreateReview/CreateReview.scss | 64 ------- src/Features/CreateReview/CreateReview.tsx | 46 ----- src/Features/CreateReview/actions.ts | 59 ------ src/Features/NavMenu/NavMenu.scss | 52 ------ src/Features/NavMenu/NavMenu.tsx | 76 -------- src/Features/NavMenu/icons/cross-icon.svg | 6 - src/Features/NavMenu/icons/menu-icon.svg | 5 - src/Features/ReportLike/ReportLike.scss | 10 - src/Features/ReportLike/ReportLike.tsx | 22 --- src/Features/ReportLike/icons/like-icon.svg | 5 - src/Features/SearchBar/SearchBar.tsx | 34 ---- src/Features/SearchBar/icons/search-icon.svg | 6 - src/Features/SignInForm/SignInForm.scss | 44 ----- src/Features/SignInForm/SignInForm.tsx | 85 --------- src/Features/SignInForm/sign-in.store.ts | 63 ------- src/Features/SignUpForm/SignUpForm.scss | 44 ----- src/Features/SignUpForm/SignUpForm.tsx | 90 --------- src/Features/SignUpForm/sign-up.store.ts | 121 ------------ src/Pages/AboutUsPage/AboutUsPage.scss | 100 ---------- src/Pages/AboutUsPage/AboutUsPage.tsx | 66 ------- src/Pages/AboutUsPage/assets/image.png | Bin 1054924 -> 0 bytes .../CreateReportPage/CreateReportPage.scss | 133 ------------- .../CreateReportPage/CreateReportPage.tsx | 94 ---------- .../CreateReportPage/icons/arrow-right.svg | 6 - .../CreateReportPage/icons/paperclip.svg | 5 - src/Pages/Homepage/Homepage.tsx | 36 ---- .../NewsDetailsPage/NewsDetailsPage.scss | 40 ---- src/Pages/NewsDetailsPage/NewsDetailsPage.tsx | 35 ---- src/Pages/NewsDetailsPage/store/index.ts | 1 - src/Pages/NewsDetailsPage/store/store.ts | 54 ------ src/Pages/NewsPage/NewsPage.scss | 24 --- src/Pages/NewsPage/NewsPage.tsx | 14 -- .../ReportDetailsPage/ReportDetailsPage.scss | 36 ---- .../ReportDetailsPage/ReportDetailsPage.tsx | 32 ---- .../ReportDetailsPage/report-details.store.ts | 57 ------ src/Pages/SignInPage/SignInPage.scss | 15 -- src/Pages/SignInPage/SignInPage.tsx | 19 -- src/Pages/SignInPage/icons/sign-in-icon.svg | 5 - src/Pages/SignUpPage/SignUpPage.scss | 15 -- src/Pages/SignUpPage/SignUpPage.tsx | 19 -- src/Pages/SignUpPage/icons/flag-icon.svg | 5 - src/Pages/StatisticsPage/StatisticsPage.scss | 24 --- src/Pages/StatisticsPage/StatisticsPage.tsx | 19 -- src/Pages/VolunteersPage/VolunteersPage.scss | 24 --- src/Pages/VolunteersPage/VolunteersPage.tsx | 14 -- .../profile/MyReportsPage/MyReportsPage.tsx | 7 - .../PersonalDataPage/PersonalDataPage.scss | 0 .../PersonalDataPage/PersonalDataPage.tsx | 7 - .../profile/ProfilePage/ProfileLayout.scss | 24 --- .../profile/ProfilePage/ProfileLayout.tsx | 17 -- src/Shared/UI/Button/Button.scss | 10 - src/Shared/UI/Button/Button.tsx | 18 -- .../UI/DefaultLoader/DefaultLoader.scss | 34 ---- src/Shared/UI/DefaultLoader/DefaultLoader.tsx | 14 -- src/Shared/UI/HeaderText/HeaderText.scss | 19 -- src/Shared/UI/HeaderText/HeaderText.tsx | 13 -- src/Shared/UI/SectionHeader/SectionHeader.tsx | 20 -- src/Shared/assets/logo.svg | 12 ++ .../fonts/TildaSans-Black/TildaSans-Black.css | 8 + .../fonts/TildaSans-Black/TildaSans-Black.eot | Bin 0 -> 46530 bytes .../TildaSans-Black/TildaSans-Black.woff | Bin 0 -> 51648 bytes .../TildaSans-Black/TildaSans-Black.woff2 | Bin 0 -> 38844 bytes .../fonts/TildaSans-Bold/TildaSans-Bold.css | 8 + .../fonts/TildaSans-Bold/TildaSans-Bold.eot | Bin 0 -> 48574 bytes .../fonts/TildaSans-Bold/TildaSans-Bold.woff | Bin 0 -> 53752 bytes .../fonts/TildaSans-Bold/TildaSans-Bold.woff2 | Bin 0 -> 40136 bytes .../TildaSans-ExtraBold.css | 9 + .../TildaSans-ExtraBold.eot | Bin 0 -> 48229 bytes .../TildaSans-ExtraBold.woff | Bin 0 -> 53380 bytes .../TildaSans-ExtraBold.woff2 | Bin 0 -> 39580 bytes .../fonts/TildaSans-Light/TildaSans-Light.css | 8 + .../fonts/TildaSans-Light/TildaSans-Light.eot | Bin 0 -> 48973 bytes .../TildaSans-Light/TildaSans-Light.woff | Bin 0 -> 54544 bytes .../TildaSans-Light/TildaSans-Light.woff2 | Bin 0 -> 40568 bytes .../TildaSans-Medium/TildaSans-Medium.css | 8 + .../TildaSans-Medium/TildaSans-Medium.eot | Bin 0 -> 48031 bytes .../TildaSans-Medium/TildaSans-Medium.woff | Bin 0 -> 53164 bytes .../TildaSans-Medium/TildaSans-Medium.woff2 | Bin 0 -> 39508 bytes .../TildaSans-Regular/TildaSans-Regular.css | 8 + .../TildaSans-Regular/TildaSans-Regular.eot | Bin 0 -> 46629 bytes .../TildaSans-Regular/TildaSans-Regular.woff | Bin 0 -> 51728 bytes .../TildaSans-Regular/TildaSans-Regular.woff2 | Bin 0 -> 38424 bytes .../TildaSans-Semibold/TildaSans-Semibold.css | 9 + .../TildaSans-Semibold/TildaSans-Semibold.eot | Bin 0 -> 48389 bytes .../TildaSans-Semibold.woff | Bin 0 -> 53412 bytes .../TildaSans-Semibold.woff2 | Bin 0 -> 39780 bytes src/Shared/fonts/TildaSans.css | 7 + src/Shared/helpers/getTokens.ts | 20 -- src/Shared/helpers/sliceDate.ts | 0 src/Shared/types.ts | 12 -- src/Shared/types/fetch-type.ts | 5 + src/Shared/types/list-type.ts | 5 + src/Shared/types/news-type.ts | 10 + src/Shared/types/report-type.ts | 32 ++++ src/Shared/ui/variables.scss | 9 + src/Shared/variables.scss | 6 - src/Shared/variables/links.ts | 7 + src/Shared/variables/pages.ts | 7 - src/Shared/variables/road-types.ts | 23 ++- src/Widgets/Footer/Footer.scss | 80 ++++++++ src/Widgets/Footer/Footer.tsx | 60 ++++++ src/Widgets/Footer/icons/app-store-btn.svg | 31 ++++ src/Widgets/Footer/icons/facebook.svg | 14 ++ src/Widgets/Footer/icons/instagram.svg | 16 ++ src/Widgets/Footer/icons/play-market-btn.svg | 15 ++ src/Widgets/Footer/icons/youtube.svg | 14 ++ src/Widgets/{home => }/Header/Header.scss | 58 ++---- src/Widgets/{home => }/Header/Header.tsx | 11 +- src/Widgets/Header/HeaderLink/HeaderLink.scss | 28 +++ src/Widgets/Header/HeaderLink/HeaderLink.tsx | 15 ++ .../HeaderLink/icons/arrow-right-circle.svg | 10 + src/Widgets/Header/assets/background.svg | 13 ++ .../MapSection}/HomeMap/HomeMap.scss | 0 .../MapSection}/HomeMap/HomeMap.tsx | 12 +- .../MapSection}/HomeMap/icons/geo-green.svg | 0 .../MapSection}/HomeMap/icons/geo-orange.svg | 0 .../MapSection}/HomeMap/icons/geo-pink.svg | 0 .../MapSection}/HomeMap/icons/geo-purple.svg | 0 .../MapSection}/HomeMap/icons/geo-red.svg | 0 .../MapSection}/HomeMap/icons/geo-yellow.svg | 0 src/Widgets/MapSection/MapSection.scss | 50 +++++ src/Widgets/MapSection/MapSection.tsx | 123 ++++++++++++ .../MapSection}/Switch/Switch.scss | 18 +- src/Widgets/MapSection/Switch/Switch.tsx | 40 ++++ src/Widgets/MapSection/mapSectionStore.ts | 41 ++++ src/Widgets/Navbar/NavAuth/NavAuth.scss | 22 +++ src/Widgets/Navbar/NavAuth/NavAuth.tsx | 43 +++++ .../Navbar/NavLanguage/NavLanguage.scss | 33 ++++ .../Navbar/NavLanguage/NavLanguage.tsx | 47 +++++ .../Navbar/NavLanguage/icons/check.svg | 7 + .../Navbar/NavLanguage/icons/chevron-down.svg | 14 ++ .../Navbar/NavLanguage/icons/globus.svg | 16 ++ src/Widgets/Navbar/NavMenu/NavMenu.scss | 25 +++ src/Widgets/Navbar/NavMenu/NavMenu.tsx | 29 +++ src/Widgets/Navbar/Navbar.scss | 86 +++++++++ src/Widgets/Navbar/Navbar.tsx | 58 ++++++ src/Widgets/Navbar/icons/cross.svg | 15 ++ src/Widgets/Navbar/icons/menu.svg | 7 + src/Widgets/NewsHeader/NewsHeader.scss | 55 ------ src/Widgets/NewsHeader/NewsHeader.tsx | 58 ------ .../NewsHeader/icons/calendar-icon.svg | 8 - src/Widgets/NewsHeader/icons/message-icon.svg | 5 - src/Widgets/NewsList/NewsList.scss | 17 -- src/Widgets/NewsList/NewsList.tsx | 29 --- src/Widgets/NewsList/news.store.ts | 45 ----- src/Widgets/NewsList/store/index.ts | 1 - src/Widgets/NewsList/store/store.ts | 39 ---- .../{home => }/NewsSection/NewsSection.scss | 31 ++-- src/Widgets/NewsSection/NewsSection.tsx | 35 ++++ src/Widgets/NewsSection/icons/arrow-right.svg | 15 ++ src/Widgets/NewsSection/newsSectionStore.ts | 23 +++ src/Widgets/ProfileNav/ProfileNav.scss | 47 ----- src/Widgets/ProfileNav/ProfileNav.tsx | 51 ----- .../RatingSection/RatingSection.scss | 24 +-- src/Widgets/RatingSection/RatingSection.tsx | 175 ++++++++++++++++++ .../RatingSection/icons/arrow-down.svg | 14 ++ src/Widgets/RatingSection/icons/arrow-up.svg | 14 ++ src/Widgets/RatingSection/icons/like.svg | 8 + src/Widgets/RatingSection/icons/message.svg | 14 ++ .../RatingSection/ratingSectionStore.ts | 51 +++++ src/Widgets/ReportImages/ReportImages.scss | 42 ----- src/Widgets/ReportImages/ReportImages.tsx | 50 ----- .../ReportImages/icons/default-image.svg | 8 - src/Widgets/ReportInfo/ReportInfo.scss | 61 ------ src/Widgets/ReportInfo/ReportInfo.tsx | 94 ---------- .../ReportInfo/icons/calendar-icon.svg | 8 - src/Widgets/ReportInfo/icons/map-pin.svg | 17 -- .../StatisticsSection/StatisticsSection.scss | 56 ++++++ .../StatisticsSection/StatisticsSection.tsx | 33 ++++ .../statisticsSection.store.ts | 35 ++++ .../StatisticsTable/StatisticsTable.scss | 103 ----------- .../StatisticsTable/StatisticsTable.tsx | 171 ----------------- .../StatisticsTable/icons/arrow-down-icon.svg | 5 - .../StatisticsTable/icons/arrow-up-icon.svg | 5 - .../StatisticsTable/icons/chevron-down.svg | 5 - .../StatisticsTable/statistics.store.ts | 40 ---- .../VolunteersTable/VolunteersTable.scss | 140 -------------- .../VolunteersTable/VolunteersTable.tsx | 75 -------- .../VolunteersTable/icons/arrow-down-icon.svg | 5 - .../VolunteersTable/icons/arrow-up-icon.svg | 5 - .../VolunteersTable/volunteer.store.ts | 39 ---- src/Widgets/general/Footer/Footer.scss | 57 ------ src/Widgets/general/Footer/Footer.tsx | 54 ------ .../general/Footer/assets/appstore.svg | 45 ----- src/Widgets/general/Footer/assets/logo.png | Bin 8891 -> 0 bytes src/Widgets/general/Footer/icons/facebook.svg | 5 - .../general/Footer/icons/instagram.svg | 7 - src/Widgets/general/Footer/icons/youtube.svg | 5 - src/Widgets/general/Navbar/Navbar.scss | 81 -------- src/Widgets/general/Navbar/Navbar.tsx | 47 ----- src/Widgets/general/Navbar/assets/logo.svg | 18 -- .../ReviewsSection/ReviewsSection.scss | 54 ------ .../general/ReviewsSection/ReviewsSection.tsx | 34 ---- src/Widgets/general/ReviewsSection/store.ts | 46 ----- src/Widgets/home/Header/assets/background.jpg | Bin 527254 -> 0 bytes .../home/Header/icons/arrow-right-icon.svg | 7 - src/Widgets/home/MapSection/MapSection.scss | 64 ------- src/Widgets/home/MapSection/MapSection.tsx | 125 ------------- .../home/MapSection/assets/geo-green.svg | 5 - .../home/MapSection/assets/geo-orange.svg | 5 - .../home/MapSection/assets/geo-pink.svg | 5 - .../home/MapSection/assets/geo-purple.svg | 5 - .../home/MapSection/assets/geo-red.svg | 5 - .../home/MapSection/assets/geo-yellow.svg | 5 - src/Widgets/home/MapSection/assets/map.jpg | Bin 588360 -> 0 bytes src/Widgets/home/MapSection/map.store.ts | 39 ---- src/Widgets/home/MapSection/types.ts | 22 --- src/Widgets/home/NewsSection/NewsSection.tsx | 45 ----- src/Widgets/home/NewsSection/assets/image.jpg | Bin 2191778 -> 0 bytes .../NewsSection/icons/arrow-right-icon.svg | 6 - .../home/NewsSection/news-home.store.ts | 40 ---- .../home/RatingSection/RatingSection.tsx | 156 ---------------- .../RatingSection/icons/arrow-down-icon.svg | 5 - .../RatingSection/icons/arrow-up-icon.svg | 5 - .../home/RatingSection/icons/like-icon.svg | 5 - .../home/RatingSection/icons/message-icon.svg | 5 - .../home/RatingSection/rating.store.ts | 45 ----- src/Widgets/home/RatingSection/types.ts | 22 --- .../StatisticsSection/StatisticsSection.scss | 55 ------ .../StatisticsSection/StatisticsSection.tsx | 28 --- .../SearchBar/SearchForm.scss} | 46 ++--- src/features/SearchBar/SearchForm.tsx | 36 ++++ src/features/SearchBar/icons/search.svg | 15 ++ src/middleware.ts | 3 - .../Home/Home.scss} | 0 src/pages/Home/Home.tsx | 36 ++++ 277 files changed, 1833 insertions(+), 5415 deletions(-) delete mode 100644 app/api/auth/[...nextauth]/route.ts delete mode 100644 app/create-report/page.tsx delete mode 100644 app/forgot-password/page.tsx delete mode 100644 app/news/[id]/page.tsx delete mode 100644 app/news/page.tsx delete mode 100644 app/profile/layout.tsx delete mode 100644 app/profile/my-reports/page.tsx rename app/{confirm-email => profile}/page.tsx (100%) delete mode 100644 app/profile/personal-data/page.tsx delete mode 100644 app/report/[id]/page.tsx delete mode 100644 app/sign-up/page.tsx delete mode 100644 app/statistics/page.tsx delete mode 100644 app/volunteers/page.tsx rename src/{Pages/Homepage/Homepage.scss => App/App.scss} (83%) delete mode 100644 src/App/Providers.tsx create mode 100644 src/App/fonts.scss delete mode 100644 src/Entities/AuthHeader/AuthHeader.scss delete mode 100644 src/Entities/AuthHeader/AuthHeader.tsx delete mode 100644 src/Entities/ChangeLanguage/ChangeLanguage.scss delete mode 100644 src/Entities/ChangeLanguage/ChangeLanguage.tsx delete mode 100644 src/Entities/ChangeLanguage/icons/check-icon.svg delete mode 100644 src/Entities/ChangeLanguage/icons/chevron-down-icon.svg delete mode 100644 src/Entities/ChangeLanguage/icons/lang-icon.svg delete mode 100644 src/Entities/CustomLink/CustomLink.scss delete mode 100644 src/Entities/CustomLink/CustomLink.tsx delete mode 100644 src/Entities/GoogleButton/GoogleButton.scss delete mode 100644 src/Entities/GoogleButton/GoogleButton.tsx delete mode 100644 src/Entities/GoogleButton/icons/google-icon.svg delete mode 100644 src/Entities/InputWithLabel/InputWithLabel.scss delete mode 100644 src/Entities/InputWithLabel/InputWithLabel.tsx delete mode 100644 src/Entities/InputWithLabel/icons/eye-icon.svg delete mode 100644 src/Entities/InputWithLabel/icons/eye-off-icon.svg delete mode 100644 src/Entities/NavAuthBtn/NavAuthBtn.scss delete mode 100644 src/Entities/NavAuthBtn/NavAuthBtn.tsx delete mode 100644 src/Entities/ReviewCard/ReviewCard.scss delete mode 100644 src/Entities/ReviewCard/ReviewCard.tsx delete mode 100644 src/Entities/ReviewCard/icons/calendar-icon.svg rename src/{Shared/UI => Entities}/SectionHeader/SectionHeader.scss (70%) create mode 100644 src/Entities/SectionHeader/SectionHeader.tsx delete mode 100644 src/Entities/Switch/Switch.tsx delete mode 100644 src/Features/CreateReportMap/CreateReportMap.scss delete mode 100644 src/Features/CreateReportMap/CreateReportMap.tsx delete mode 100644 src/Features/CreateReportMap/assets/pin.svg delete mode 100644 src/Features/CreateReview/CreateReview.scss delete mode 100644 src/Features/CreateReview/CreateReview.tsx delete mode 100644 src/Features/CreateReview/actions.ts delete mode 100644 src/Features/NavMenu/NavMenu.scss delete mode 100644 src/Features/NavMenu/NavMenu.tsx delete mode 100644 src/Features/NavMenu/icons/cross-icon.svg delete mode 100644 src/Features/NavMenu/icons/menu-icon.svg delete mode 100644 src/Features/ReportLike/ReportLike.scss delete mode 100644 src/Features/ReportLike/ReportLike.tsx delete mode 100644 src/Features/ReportLike/icons/like-icon.svg delete mode 100644 src/Features/SearchBar/SearchBar.tsx delete mode 100644 src/Features/SearchBar/icons/search-icon.svg delete mode 100644 src/Features/SignInForm/SignInForm.scss delete mode 100644 src/Features/SignInForm/SignInForm.tsx delete mode 100644 src/Features/SignInForm/sign-in.store.ts delete mode 100644 src/Features/SignUpForm/SignUpForm.scss delete mode 100644 src/Features/SignUpForm/SignUpForm.tsx delete mode 100644 src/Features/SignUpForm/sign-up.store.ts delete mode 100644 src/Pages/AboutUsPage/AboutUsPage.scss delete mode 100644 src/Pages/AboutUsPage/AboutUsPage.tsx delete mode 100644 src/Pages/AboutUsPage/assets/image.png delete mode 100644 src/Pages/CreateReportPage/CreateReportPage.scss delete mode 100644 src/Pages/CreateReportPage/CreateReportPage.tsx delete mode 100644 src/Pages/CreateReportPage/icons/arrow-right.svg delete mode 100644 src/Pages/CreateReportPage/icons/paperclip.svg delete mode 100644 src/Pages/Homepage/Homepage.tsx delete mode 100644 src/Pages/NewsDetailsPage/NewsDetailsPage.scss delete mode 100644 src/Pages/NewsDetailsPage/NewsDetailsPage.tsx delete mode 100644 src/Pages/NewsDetailsPage/store/index.ts delete mode 100644 src/Pages/NewsDetailsPage/store/store.ts delete mode 100644 src/Pages/NewsPage/NewsPage.scss delete mode 100644 src/Pages/NewsPage/NewsPage.tsx delete mode 100644 src/Pages/ReportDetailsPage/ReportDetailsPage.scss delete mode 100644 src/Pages/ReportDetailsPage/ReportDetailsPage.tsx delete mode 100644 src/Pages/ReportDetailsPage/report-details.store.ts delete mode 100644 src/Pages/SignInPage/SignInPage.scss delete mode 100644 src/Pages/SignInPage/SignInPage.tsx delete mode 100644 src/Pages/SignInPage/icons/sign-in-icon.svg delete mode 100644 src/Pages/SignUpPage/SignUpPage.scss delete mode 100644 src/Pages/SignUpPage/SignUpPage.tsx delete mode 100644 src/Pages/SignUpPage/icons/flag-icon.svg delete mode 100644 src/Pages/StatisticsPage/StatisticsPage.scss delete mode 100644 src/Pages/StatisticsPage/StatisticsPage.tsx delete mode 100644 src/Pages/VolunteersPage/VolunteersPage.scss delete mode 100644 src/Pages/VolunteersPage/VolunteersPage.tsx delete mode 100644 src/Pages/profile/MyReportsPage/MyReportsPage.tsx delete mode 100644 src/Pages/profile/PersonalDataPage/PersonalDataPage.scss delete mode 100644 src/Pages/profile/PersonalDataPage/PersonalDataPage.tsx delete mode 100644 src/Pages/profile/ProfilePage/ProfileLayout.scss delete mode 100644 src/Pages/profile/ProfilePage/ProfileLayout.tsx delete mode 100644 src/Shared/UI/Button/Button.scss delete mode 100644 src/Shared/UI/Button/Button.tsx delete mode 100644 src/Shared/UI/DefaultLoader/DefaultLoader.scss delete mode 100644 src/Shared/UI/DefaultLoader/DefaultLoader.tsx delete mode 100644 src/Shared/UI/HeaderText/HeaderText.scss delete mode 100644 src/Shared/UI/HeaderText/HeaderText.tsx delete mode 100644 src/Shared/UI/SectionHeader/SectionHeader.tsx create mode 100644 src/Shared/assets/logo.svg create mode 100644 src/Shared/fonts/TildaSans-Black/TildaSans-Black.css create mode 100644 src/Shared/fonts/TildaSans-Black/TildaSans-Black.eot create mode 100644 src/Shared/fonts/TildaSans-Black/TildaSans-Black.woff create mode 100644 src/Shared/fonts/TildaSans-Black/TildaSans-Black.woff2 create mode 100644 src/Shared/fonts/TildaSans-Bold/TildaSans-Bold.css create mode 100644 src/Shared/fonts/TildaSans-Bold/TildaSans-Bold.eot create mode 100644 src/Shared/fonts/TildaSans-Bold/TildaSans-Bold.woff create mode 100644 src/Shared/fonts/TildaSans-Bold/TildaSans-Bold.woff2 create mode 100644 src/Shared/fonts/TildaSans-ExtraBold/TildaSans-ExtraBold.css create mode 100644 src/Shared/fonts/TildaSans-ExtraBold/TildaSans-ExtraBold.eot create mode 100644 src/Shared/fonts/TildaSans-ExtraBold/TildaSans-ExtraBold.woff create mode 100644 src/Shared/fonts/TildaSans-ExtraBold/TildaSans-ExtraBold.woff2 create mode 100644 src/Shared/fonts/TildaSans-Light/TildaSans-Light.css create mode 100644 src/Shared/fonts/TildaSans-Light/TildaSans-Light.eot create mode 100644 src/Shared/fonts/TildaSans-Light/TildaSans-Light.woff create mode 100644 src/Shared/fonts/TildaSans-Light/TildaSans-Light.woff2 create mode 100644 src/Shared/fonts/TildaSans-Medium/TildaSans-Medium.css create mode 100644 src/Shared/fonts/TildaSans-Medium/TildaSans-Medium.eot create mode 100644 src/Shared/fonts/TildaSans-Medium/TildaSans-Medium.woff create mode 100644 src/Shared/fonts/TildaSans-Medium/TildaSans-Medium.woff2 create mode 100644 src/Shared/fonts/TildaSans-Regular/TildaSans-Regular.css create mode 100644 src/Shared/fonts/TildaSans-Regular/TildaSans-Regular.eot create mode 100644 src/Shared/fonts/TildaSans-Regular/TildaSans-Regular.woff create mode 100644 src/Shared/fonts/TildaSans-Regular/TildaSans-Regular.woff2 create mode 100644 src/Shared/fonts/TildaSans-Semibold/TildaSans-Semibold.css create mode 100644 src/Shared/fonts/TildaSans-Semibold/TildaSans-Semibold.eot create mode 100644 src/Shared/fonts/TildaSans-Semibold/TildaSans-Semibold.woff create mode 100644 src/Shared/fonts/TildaSans-Semibold/TildaSans-Semibold.woff2 create mode 100644 src/Shared/fonts/TildaSans.css delete mode 100644 src/Shared/helpers/getTokens.ts delete mode 100644 src/Shared/helpers/sliceDate.ts delete mode 100644 src/Shared/types.ts create mode 100644 src/Shared/types/fetch-type.ts create mode 100644 src/Shared/types/list-type.ts create mode 100644 src/Shared/types/news-type.ts create mode 100644 src/Shared/types/report-type.ts create mode 100644 src/Shared/ui/variables.scss delete mode 100644 src/Shared/variables.scss create mode 100644 src/Shared/variables/links.ts delete mode 100644 src/Shared/variables/pages.ts create mode 100644 src/Widgets/Footer/Footer.scss create mode 100644 src/Widgets/Footer/Footer.tsx create mode 100644 src/Widgets/Footer/icons/app-store-btn.svg create mode 100644 src/Widgets/Footer/icons/facebook.svg create mode 100644 src/Widgets/Footer/icons/instagram.svg create mode 100644 src/Widgets/Footer/icons/play-market-btn.svg create mode 100644 src/Widgets/Footer/icons/youtube.svg rename src/Widgets/{home => }/Header/Header.scss (56%) rename src/Widgets/{home => }/Header/Header.tsx (61%) create mode 100644 src/Widgets/Header/HeaderLink/HeaderLink.scss create mode 100644 src/Widgets/Header/HeaderLink/HeaderLink.tsx create mode 100644 src/Widgets/Header/HeaderLink/icons/arrow-right-circle.svg create mode 100644 src/Widgets/Header/assets/background.svg rename src/{Features => Widgets/MapSection}/HomeMap/HomeMap.scss (100%) rename src/{Features => Widgets/MapSection}/HomeMap/HomeMap.tsx (91%) rename src/{Features => Widgets/MapSection}/HomeMap/icons/geo-green.svg (100%) rename src/{Features => Widgets/MapSection}/HomeMap/icons/geo-orange.svg (100%) rename src/{Features => Widgets/MapSection}/HomeMap/icons/geo-pink.svg (100%) rename src/{Features => Widgets/MapSection}/HomeMap/icons/geo-purple.svg (100%) rename src/{Features => Widgets/MapSection}/HomeMap/icons/geo-red.svg (100%) rename src/{Features => Widgets/MapSection}/HomeMap/icons/geo-yellow.svg (100%) create mode 100644 src/Widgets/MapSection/MapSection.scss create mode 100644 src/Widgets/MapSection/MapSection.tsx rename src/{Entities => Widgets/MapSection}/Switch/Switch.scss (70%) create mode 100644 src/Widgets/MapSection/Switch/Switch.tsx create mode 100644 src/Widgets/MapSection/mapSectionStore.ts create mode 100644 src/Widgets/Navbar/NavAuth/NavAuth.scss create mode 100644 src/Widgets/Navbar/NavAuth/NavAuth.tsx create mode 100644 src/Widgets/Navbar/NavLanguage/NavLanguage.scss create mode 100644 src/Widgets/Navbar/NavLanguage/NavLanguage.tsx create mode 100644 src/Widgets/Navbar/NavLanguage/icons/check.svg create mode 100644 src/Widgets/Navbar/NavLanguage/icons/chevron-down.svg create mode 100644 src/Widgets/Navbar/NavLanguage/icons/globus.svg create mode 100644 src/Widgets/Navbar/NavMenu/NavMenu.scss create mode 100644 src/Widgets/Navbar/NavMenu/NavMenu.tsx create mode 100644 src/Widgets/Navbar/Navbar.scss create mode 100644 src/Widgets/Navbar/Navbar.tsx create mode 100644 src/Widgets/Navbar/icons/cross.svg create mode 100644 src/Widgets/Navbar/icons/menu.svg delete mode 100644 src/Widgets/NewsHeader/NewsHeader.scss delete mode 100644 src/Widgets/NewsHeader/NewsHeader.tsx delete mode 100644 src/Widgets/NewsHeader/icons/calendar-icon.svg delete mode 100644 src/Widgets/NewsHeader/icons/message-icon.svg delete mode 100644 src/Widgets/NewsList/NewsList.scss delete mode 100644 src/Widgets/NewsList/NewsList.tsx delete mode 100644 src/Widgets/NewsList/news.store.ts delete mode 100644 src/Widgets/NewsList/store/index.ts delete mode 100644 src/Widgets/NewsList/store/store.ts rename src/Widgets/{home => }/NewsSection/NewsSection.scss (72%) create mode 100644 src/Widgets/NewsSection/NewsSection.tsx create mode 100644 src/Widgets/NewsSection/icons/arrow-right.svg create mode 100644 src/Widgets/NewsSection/newsSectionStore.ts delete mode 100644 src/Widgets/ProfileNav/ProfileNav.scss delete mode 100644 src/Widgets/ProfileNav/ProfileNav.tsx rename src/Widgets/{home => }/RatingSection/RatingSection.scss (91%) create mode 100644 src/Widgets/RatingSection/RatingSection.tsx create mode 100644 src/Widgets/RatingSection/icons/arrow-down.svg create mode 100644 src/Widgets/RatingSection/icons/arrow-up.svg create mode 100644 src/Widgets/RatingSection/icons/like.svg create mode 100644 src/Widgets/RatingSection/icons/message.svg create mode 100644 src/Widgets/RatingSection/ratingSectionStore.ts delete mode 100644 src/Widgets/ReportImages/ReportImages.scss delete mode 100644 src/Widgets/ReportImages/ReportImages.tsx delete mode 100644 src/Widgets/ReportImages/icons/default-image.svg delete mode 100644 src/Widgets/ReportInfo/ReportInfo.scss delete mode 100644 src/Widgets/ReportInfo/ReportInfo.tsx delete mode 100644 src/Widgets/ReportInfo/icons/calendar-icon.svg delete mode 100644 src/Widgets/ReportInfo/icons/map-pin.svg create mode 100644 src/Widgets/StatisticsSection/StatisticsSection.scss create mode 100644 src/Widgets/StatisticsSection/StatisticsSection.tsx create mode 100644 src/Widgets/StatisticsSection/statisticsSection.store.ts delete mode 100644 src/Widgets/StatisticsTable/StatisticsTable.scss delete mode 100644 src/Widgets/StatisticsTable/StatisticsTable.tsx delete mode 100644 src/Widgets/StatisticsTable/icons/arrow-down-icon.svg delete mode 100644 src/Widgets/StatisticsTable/icons/arrow-up-icon.svg delete mode 100644 src/Widgets/StatisticsTable/icons/chevron-down.svg delete mode 100644 src/Widgets/StatisticsTable/statistics.store.ts delete mode 100644 src/Widgets/VolunteersTable/VolunteersTable.scss delete mode 100644 src/Widgets/VolunteersTable/VolunteersTable.tsx delete mode 100644 src/Widgets/VolunteersTable/icons/arrow-down-icon.svg delete mode 100644 src/Widgets/VolunteersTable/icons/arrow-up-icon.svg delete mode 100644 src/Widgets/VolunteersTable/volunteer.store.ts delete mode 100644 src/Widgets/general/Footer/Footer.scss delete mode 100644 src/Widgets/general/Footer/Footer.tsx delete mode 100644 src/Widgets/general/Footer/assets/appstore.svg delete mode 100644 src/Widgets/general/Footer/assets/logo.png delete mode 100644 src/Widgets/general/Footer/icons/facebook.svg delete mode 100644 src/Widgets/general/Footer/icons/instagram.svg delete mode 100644 src/Widgets/general/Footer/icons/youtube.svg delete mode 100644 src/Widgets/general/Navbar/Navbar.scss delete mode 100644 src/Widgets/general/Navbar/Navbar.tsx delete mode 100644 src/Widgets/general/Navbar/assets/logo.svg delete mode 100644 src/Widgets/general/ReviewsSection/ReviewsSection.scss delete mode 100644 src/Widgets/general/ReviewsSection/ReviewsSection.tsx delete mode 100644 src/Widgets/general/ReviewsSection/store.ts delete mode 100644 src/Widgets/home/Header/assets/background.jpg delete mode 100644 src/Widgets/home/Header/icons/arrow-right-icon.svg delete mode 100644 src/Widgets/home/MapSection/MapSection.scss delete mode 100644 src/Widgets/home/MapSection/MapSection.tsx delete mode 100644 src/Widgets/home/MapSection/assets/geo-green.svg delete mode 100644 src/Widgets/home/MapSection/assets/geo-orange.svg delete mode 100644 src/Widgets/home/MapSection/assets/geo-pink.svg delete mode 100644 src/Widgets/home/MapSection/assets/geo-purple.svg delete mode 100644 src/Widgets/home/MapSection/assets/geo-red.svg delete mode 100644 src/Widgets/home/MapSection/assets/geo-yellow.svg delete mode 100644 src/Widgets/home/MapSection/assets/map.jpg delete mode 100644 src/Widgets/home/MapSection/map.store.ts delete mode 100644 src/Widgets/home/MapSection/types.ts delete mode 100644 src/Widgets/home/NewsSection/NewsSection.tsx delete mode 100644 src/Widgets/home/NewsSection/assets/image.jpg delete mode 100644 src/Widgets/home/NewsSection/icons/arrow-right-icon.svg delete mode 100644 src/Widgets/home/NewsSection/news-home.store.ts delete mode 100644 src/Widgets/home/RatingSection/RatingSection.tsx delete mode 100644 src/Widgets/home/RatingSection/icons/arrow-down-icon.svg delete mode 100644 src/Widgets/home/RatingSection/icons/arrow-up-icon.svg delete mode 100644 src/Widgets/home/RatingSection/icons/like-icon.svg delete mode 100644 src/Widgets/home/RatingSection/icons/message-icon.svg delete mode 100644 src/Widgets/home/RatingSection/rating.store.ts delete mode 100644 src/Widgets/home/RatingSection/types.ts delete mode 100644 src/Widgets/home/StatisticsSection/StatisticsSection.scss delete mode 100644 src/Widgets/home/StatisticsSection/StatisticsSection.tsx rename src/{Features/SearchBar/SearchBar.scss => features/SearchBar/SearchForm.scss} (52%) create mode 100644 src/features/SearchBar/SearchForm.tsx create mode 100644 src/features/SearchBar/icons/search.svg delete mode 100644 src/middleware.ts rename src/{Pages/profile/MyReportsPage/MyReportsPage.scss => pages/Home/Home.scss} (100%) create mode 100644 src/pages/Home/Home.tsx diff --git a/app/about-us/page.tsx b/app/about-us/page.tsx index 7c7697c..a54c709 100644 --- a/app/about-us/page.tsx +++ b/app/about-us/page.tsx @@ -1,3 +1,7 @@ -import AboutUsPage from "@/Pages/AboutUsPage/AboutUsPage"; +import React from "react"; -export default AboutUsPage; +const page = () => { + return
page
; +}; + +export default page; diff --git a/app/api/auth/[...nextauth]/route.ts b/app/api/auth/[...nextauth]/route.ts deleted file mode 100644 index 8db3ff8..0000000 --- a/app/api/auth/[...nextauth]/route.ts +++ /dev/null @@ -1,91 +0,0 @@ -import axios from "axios"; -import NextAuth, { NextAuthOptions } from "next-auth"; -import { JWT } from "next-auth/jwt"; -import CredentialsProvider from "next-auth/providers/credentials"; - -interface IToken { - access: string; -} - -const refreshToken = async (token: JWT): Promise => { - const data = { - refresh: token.refresh_token, - }; - - const response = await axios.post( - "https://api.kgroaduat.fishrungames.com/api/v1/token/refresh/", - data - ); - - return { - ...token, - access_token: response.data.access, - }; -}; - -export const authOptions: NextAuthOptions = { - providers: [ - CredentialsProvider({ - name: "Credentials", - credentials: { - email: { - label: "Email", - type: "text", - placeholder: "jsmith@example.com", - }, - password: { label: "Password", type: "password" }, - }, - async authorize(credentials, req) { - if (!credentials?.email || !credentials?.password) - return null; - const { email, password } = credentials as any; - - const res = await fetch( - "https://api.kgroaduat.fishrungames.com/api/v1/users/login/", - { - method: "POST", - headers: { - "Content-Type": "application/json", - }, - body: JSON.stringify({ - email, - password, - }), - } - ); - - if (res.status === 401) { - console.log(res.status); - return null; - } - - const user = await res.json(); - return user; - }, - }), - ], - pages: { - signIn: "/sign-in", - }, - session: { - strategy: "jwt", - }, - callbacks: { - async jwt({ token, user }) { - if (user) return { ...token, ...user }; - - return refreshToken(token); - }, - - async session({ token, session }) { - session.access_token = token.access_token; - session.refresh_token = token.refresh_token; - - return session; - }, - }, -}; - -const handler = NextAuth(authOptions); - -export { handler as GET, handler as POST }; diff --git a/app/create-report/page.tsx b/app/create-report/page.tsx deleted file mode 100644 index e05f648..0000000 --- a/app/create-report/page.tsx +++ /dev/null @@ -1,3 +0,0 @@ -import CreateReportPage from "@/Pages/CreateReportPage/CreateReportPage"; - -export default CreateReportPage; diff --git a/app/forgot-password/page.tsx b/app/forgot-password/page.tsx deleted file mode 100644 index a54c709..0000000 --- a/app/forgot-password/page.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import React from "react"; - -const page = () => { - return
page
; -}; - -export default page; diff --git a/app/layout.tsx b/app/layout.tsx index 31838fa..d592330 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,9 +1,3 @@ -import RootLayout from "@/App/App"; -import type { Metadata } from "next"; - -export const metadata: Metadata = { - title: "KG Road", - description: "Road in Kyrgyzstan", -}; +import RootLayout from "@/app/App"; export default RootLayout; diff --git a/app/news/[id]/page.tsx b/app/news/[id]/page.tsx deleted file mode 100644 index 35001fc..0000000 --- a/app/news/[id]/page.tsx +++ /dev/null @@ -1,3 +0,0 @@ -import NewsDetailsPage from "@/Pages/NewsDetailsPage/NewsDetailsPage"; - -export default NewsDetailsPage; diff --git a/app/news/page.tsx b/app/news/page.tsx deleted file mode 100644 index 955b210..0000000 --- a/app/news/page.tsx +++ /dev/null @@ -1,3 +0,0 @@ -import NewsPage from "@/Pages/NewsPage/NewsPage"; - -export default NewsPage; diff --git a/app/page.tsx b/app/page.tsx index 3095677..9d4589f 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -1,3 +1,3 @@ -import Homepage from "@/Pages/Homepage/Homepage"; +import Home from "@/pages/Home/Home"; -export default Homepage; +export default Home; diff --git a/app/profile/layout.tsx b/app/profile/layout.tsx deleted file mode 100644 index 7eb27f3..0000000 --- a/app/profile/layout.tsx +++ /dev/null @@ -1,3 +0,0 @@ -import ProfileLayout from "@/Pages/profile/ProfilePage/ProfileLayout"; - -export default ProfileLayout; diff --git a/app/profile/my-reports/page.tsx b/app/profile/my-reports/page.tsx deleted file mode 100644 index 3e91dd0..0000000 --- a/app/profile/my-reports/page.tsx +++ /dev/null @@ -1,3 +0,0 @@ -import MyReportsPage from "@/Pages/profile/MyReportsPage/MyReportsPage"; - -export default MyReportsPage; diff --git a/app/confirm-email/page.tsx b/app/profile/page.tsx similarity index 100% rename from app/confirm-email/page.tsx rename to app/profile/page.tsx diff --git a/app/profile/personal-data/page.tsx b/app/profile/personal-data/page.tsx deleted file mode 100644 index 9122a75..0000000 --- a/app/profile/personal-data/page.tsx +++ /dev/null @@ -1,3 +0,0 @@ -import PersonalDataPage from "@/Pages/profile/PersonalDataPage/PersonalDataPage"; - -export default PersonalDataPage; diff --git a/app/report/[id]/page.tsx b/app/report/[id]/page.tsx deleted file mode 100644 index 614d113..0000000 --- a/app/report/[id]/page.tsx +++ /dev/null @@ -1,3 +0,0 @@ -import ReportDetailsPage from "@/Pages/ReportDetailsPage/ReportDetailsPage"; - -export default ReportDetailsPage; diff --git a/app/sign-in/page.tsx b/app/sign-in/page.tsx index b7c9593..a54c709 100644 --- a/app/sign-in/page.tsx +++ b/app/sign-in/page.tsx @@ -1,3 +1,7 @@ -import SignInPage from "@/Pages/SignInPage/SignInPage"; +import React from "react"; -export default SignInPage; +const page = () => { + return
page
; +}; + +export default page; diff --git a/app/sign-up/page.tsx b/app/sign-up/page.tsx deleted file mode 100644 index d6447b2..0000000 --- a/app/sign-up/page.tsx +++ /dev/null @@ -1,3 +0,0 @@ -import SignUpPage from "@/Pages/SignUpPage/SignUpPage"; - -export default SignUpPage; diff --git a/app/statistics/page.tsx b/app/statistics/page.tsx deleted file mode 100644 index 2ea4a18..0000000 --- a/app/statistics/page.tsx +++ /dev/null @@ -1,3 +0,0 @@ -import StatisticsPage from "@/Pages/StatisticsPage/StatisticsPage"; - -export default StatisticsPage; diff --git a/app/volunteers/page.tsx b/app/volunteers/page.tsx deleted file mode 100644 index 8bc622c..0000000 --- a/app/volunteers/page.tsx +++ /dev/null @@ -1,3 +0,0 @@ -import VolunteersPage from "@/Pages/VolunteersPage/VolunteersPage"; - -export default VolunteersPage; diff --git a/src/Pages/Homepage/Homepage.scss b/src/App/App.scss similarity index 83% rename from src/Pages/Homepage/Homepage.scss rename to src/App/App.scss index dba3251..dc6a91b 100644 --- a/src/Pages/Homepage/Homepage.scss +++ b/src/App/App.scss @@ -1,9 +1,9 @@ -.home { +.app { padding-top: 78px; } @media screen and (max-width: 768px) { - .home { + .app { padding-top: 72px; } } diff --git a/src/App/App.tsx b/src/App/App.tsx index 18826aa..64c0881 100644 --- a/src/App/App.tsx +++ b/src/App/App.tsx @@ -1,10 +1,8 @@ -import { Montserrat } from "next/font/google"; import "./globals.scss"; -import Navbar from "@/Widgets/general/Navbar/Navbar"; -import Footer from "@/Widgets/general/Footer/Footer"; -import { Providers } from "./Providers"; - -const montserrat = Montserrat({ subsets: ["latin"] }); +import "./fonts.scss"; +import "./App.scss"; +import Footer from "@/widgets/Footer/Footer"; +import Navbar from "@/widgets/Navbar/Navbar"; export default function RootLayout({ children, @@ -13,12 +11,10 @@ export default function RootLayout({ }>) { return ( - - - - {children} -