From 871f2d961e9c18c486cab4dbe8df1c9cda5c4cd2 Mon Sep 17 00:00:00 2001 From: inmake Date: Tue, 16 Jul 2024 21:55:10 +0500 Subject: [PATCH] upd --- client/src/components/Logo.tsx | 13 +- .../complexPage/ComplexTopPanel.tsx | 2 +- .../FloorSidebar/FloorSidebar.tsx | 51 +- .../FloorSidebar/WestWingFloorLayout.tsx | 1593 +++++++++++++++++ .../WestWingTopLevelsHighlighting.tsx | 7 - .../SequenceWing/SequenceWing.tsx | 8 +- .../header/Header/DesktopHeader.tsx | 11 +- .../src/components/header/Navbar/Navbar.tsx | 1 + .../header/Navbar/NavbarDesktop.tsx | 2 +- .../header/Navbar/NavbarTabDesktop.tsx | 2 +- client/src/components/icons/DownloadIcon.tsx | 21 + .../modals/mobile/WingFloorModal.tsx | 17 +- client/src/consts/tabs.tsx | 26 +- .../Layout.tsx => layouts/DefaultLayout.tsx} | 12 +- client/src/main.tsx | 63 +- .../src/pages/{Company.tsx => AboutPage.tsx} | 4 +- ...AboutComplex.tsx => AboutProjectsPage.tsx} | 6 +- .../{Apartment.tsx => ApartmentPage.tsx} | 0 .../pages/{Complex.tsx => ComplexPage.tsx} | 6 +- .../{ComplexWing.tsx => ComplexWingPage.tsx} | 6 +- .../{Favorites.tsx => FavoritesPage.tsx} | 4 +- .../{Masterplan.tsx => MasterplanPage.tsx} | 6 +- .../src/pages/{Search.tsx => SearchPage.tsx} | 4 +- client/src/pages/UnitTypesPage.tsx | 5 + client/src/types/tab.ts | 2 +- 25 files changed, 1751 insertions(+), 121 deletions(-) create mode 100644 client/src/components/complexWingPage/FloorSidebar/WestWingFloorLayout.tsx create mode 100644 client/src/components/icons/DownloadIcon.tsx rename client/src/{components/header/Header/Layout.tsx => layouts/DefaultLayout.tsx} (68%) rename client/src/pages/{Company.tsx => AboutPage.tsx} (95%) rename client/src/pages/{AboutComplex.tsx => AboutProjectsPage.tsx} (99%) rename client/src/pages/{Apartment.tsx => ApartmentPage.tsx} (100%) rename client/src/pages/{Complex.tsx => ComplexPage.tsx} (88%) rename client/src/pages/{ComplexWing.tsx => ComplexWingPage.tsx} (86%) rename client/src/pages/{Favorites.tsx => FavoritesPage.tsx} (99%) rename client/src/pages/{Masterplan.tsx => MasterplanPage.tsx} (90%) rename client/src/pages/{Search.tsx => SearchPage.tsx} (88%) create mode 100644 client/src/pages/UnitTypesPage.tsx diff --git a/client/src/components/Logo.tsx b/client/src/components/Logo.tsx index 425fc18..787d33a 100644 --- a/client/src/components/Logo.tsx +++ b/client/src/components/Logo.tsx @@ -1,4 +1,3 @@ -import { useNavigate } from "react-router-dom"; import LogoIcon from "./icons/LogoIcon"; interface LogoProps { @@ -6,19 +5,13 @@ interface LogoProps { } const Logo = ({ className = "" }: LogoProps) => { - const navigate = useNavigate(); - - const handleOnLogoClick = () => { - navigate("../"); - }; - return ( -
-
+ ); }; diff --git a/client/src/components/complexPage/ComplexTopPanel.tsx b/client/src/components/complexPage/ComplexTopPanel.tsx index 0f07794..9ec464a 100644 --- a/client/src/components/complexPage/ComplexTopPanel.tsx +++ b/client/src/components/complexPage/ComplexTopPanel.tsx @@ -56,7 +56,7 @@ const ComplexTopPanel = () => { }; const handleOnAboutComplexClick = () => { - navigate(`../aboutComplex`); + navigate(`../about-projects`); }; return ( diff --git a/client/src/components/complexWingPage/FloorSidebar/FloorSidebar.tsx b/client/src/components/complexWingPage/FloorSidebar/FloorSidebar.tsx index 327b2fb..100dca2 100644 --- a/client/src/components/complexWingPage/FloorSidebar/FloorSidebar.tsx +++ b/client/src/components/complexWingPage/FloorSidebar/FloorSidebar.tsx @@ -8,10 +8,11 @@ import WestWingLayout from "./WestWingLayout"; import useModal from "../../../store/useModal"; import AboutComplexModal from "../../modals/AboutComplexModal"; import { IAparmentRes } from "../../../types/apartmentsRes"; -import WestWingTopLevelsLayout from "./WestWingTopLevelsLayout"; -import WestWingTopLevelsHighlighting from "./WestWingTopLevelsHighlighting"; +// import WestWingTopLevelsLayout from "./WestWingTopLevelsLayout"; +// import WestWingTopLevelsHighlighting from "./WestWingTopLevelsHighlighting"; import { apartmentsWithoutVirtualTour } from "../../../consts/apartmentsWithoutVirtualTour"; import { filterCurrentApartment } from "../../../calc/filterCurrentApartment"; +import WestWingFloorLayout from "./WestWingFloorLayout"; interface IFloorSidebarProps { currentFloor: IDesctiptionFloor | null; @@ -43,7 +44,7 @@ const FloorSidebar = ({ } function handleOnApartmentClick( - event: React.MouseEvent + event: React.MouseEvent ) { const apartmentType = event.currentTarget.dataset.type; if (!apartmentType) return; @@ -67,7 +68,7 @@ const FloorSidebar = ({ } function handleOnMouseOver( - event: React.MouseEvent + event: React.MouseEvent ): void { const apartmentType = event.currentTarget.dataset.type; if (!apartmentType) return; @@ -137,7 +138,7 @@ const FloorSidebar = ({
@@ -151,6 +152,7 @@ const FloorSidebar = ({
{floorApartments.length} units
+
@@ -174,7 +176,7 @@ const FloorSidebar = ({
-
+ {currentFloor?.wing === "West Wing" ? ( currentFloor && currentFloor.floor <= 21 ? ( ) : ( - - - + // + // + // + <> + - + ) ) : ( ) : } */} -
+ ); diff --git a/client/src/components/complexWingPage/FloorSidebar/WestWingFloorLayout.tsx b/client/src/components/complexWingPage/FloorSidebar/WestWingFloorLayout.tsx new file mode 100644 index 0000000..c044e18 --- /dev/null +++ b/client/src/components/complexWingPage/FloorSidebar/WestWingFloorLayout.tsx @@ -0,0 +1,1593 @@ +interface Props { + handleMouseEnter: (e: React.MouseEvent) => void; + handleMouseLeave: () => void; + handleClick: (e: React.MouseEvent) => void; +} + +function WestWingFloorLayout({ + handleMouseEnter, + handleMouseLeave, + handleClick, +}: Props) { + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ); +} + +export default WestWingFloorLayout; diff --git a/client/src/components/complexWingPage/FloorSidebar/WestWingTopLevelsHighlighting.tsx b/client/src/components/complexWingPage/FloorSidebar/WestWingTopLevelsHighlighting.tsx index a8fa973..d55f95b 100644 --- a/client/src/components/complexWingPage/FloorSidebar/WestWingTopLevelsHighlighting.tsx +++ b/client/src/components/complexWingPage/FloorSidebar/WestWingTopLevelsHighlighting.tsx @@ -383,13 +383,6 @@ function WestWingTopLevelsHighlighting({ fillOpacity="0.2" /> - - Test test test - { // if (!currentHoveredFloor) return; setModal( ); }; @@ -225,8 +225,8 @@ const SequenceWing = () => { // if (!currentHoveredFloor) return; setModal( ); }; diff --git a/client/src/components/header/Header/DesktopHeader.tsx b/client/src/components/header/Header/DesktopHeader.tsx index 7c54361..022b37e 100644 --- a/client/src/components/header/Header/DesktopHeader.tsx +++ b/client/src/components/header/Header/DesktopHeader.tsx @@ -2,15 +2,22 @@ import Auth from "../Auth/Auth"; import Logo from "../../Logo"; import Navbar from "../Navbar/Navbar"; import Location from "../Location"; +import DownloadIcon from "../../icons/DownloadIcon"; const DesktopHeader = () => ( -
+
- +
+ + +
); diff --git a/client/src/components/header/Navbar/Navbar.tsx b/client/src/components/header/Navbar/Navbar.tsx index 465c83b..12610fc 100644 --- a/client/src/components/header/Navbar/Navbar.tsx +++ b/client/src/components/header/Navbar/Navbar.tsx @@ -1,3 +1,4 @@ +/* eslint-disable react-hooks/exhaustive-deps */ import { useEffect, useState } from "react"; import { isMobile } from "react-device-detect"; import { useNavigate, useLocation } from "react-router-dom"; diff --git a/client/src/components/header/Navbar/NavbarDesktop.tsx b/client/src/components/header/Navbar/NavbarDesktop.tsx index 7095ea1..d87963b 100644 --- a/client/src/components/header/Navbar/NavbarDesktop.tsx +++ b/client/src/components/header/Navbar/NavbarDesktop.tsx @@ -9,7 +9,7 @@ interface NavbarProps { const NavbarDesktop = ({ selectedTab, onTabClick, tabs }: NavbarProps) => (