From 3c148129f7b5943443a888da7dde760c421da3c9 Mon Sep 17 00:00:00 2001
From: inmake
Date: Mon, 5 Aug 2024 15:20:15 +0500
Subject: [PATCH] upd
---
.../complexWingPage/FloorDescription.tsx | 142 ++++++++++--------
.../SequenceWing/WingSignatures.tsx | 50 +++++-
.../src/components/header/Navbar/Navbar.tsx | 5 +-
client/src/main.tsx | 5 +-
4 files changed, 137 insertions(+), 65 deletions(-)
diff --git a/client/src/components/complexWingPage/FloorDescription.tsx b/client/src/components/complexWingPage/FloorDescription.tsx
index a3a504b..0b58d2b 100644
--- a/client/src/components/complexWingPage/FloorDescription.tsx
+++ b/client/src/components/complexWingPage/FloorDescription.tsx
@@ -33,71 +33,93 @@ const FloorDescription = ({
{descriptionFloor?.wing}
-
- {floorApartments.length} units
-
+ {floorApartments.length > 0 && (
+
+ {floorApartments.length} units
+
+ )}
-
-
-
-
- {
- floorApartments.filter(
- (apart) => apart.unitType === "Studio Flex"
- ).length
- }
+ {floorApartments.filter((apart) => apart.unitType === "Studio Flex")
+ .length > 0 && (
+
+
+
+
+ {
+ floorApartments.filter(
+ (apart) => apart.unitType === "Studio Flex"
+ ).length
+ }
+
+
+
Studio Flex
+
+
Unavailable
+
+ )}
+
+ {floorApartments.filter(
+ (apart) => apart.unitType === "Studio Squared"
+ ).length > 0 && (
+
+
+
+
+ {
+ floorApartments.filter(
+ (apart) => apart.unitType === "Studio Squared"
+ ).length
+ }
+
+
+
Studio²
+
+
Unavailable
+
+ )}
+
+ {floorApartments.filter(
+ (apart) => apart.unitType === "1 BR Squared"
+ ).length > 0 && (
+
+
+
+
+ {
+ floorApartments.filter(
+ (apart) => apart.unitType === "1 BR Squared"
+ ).length
+ }
+
+
+
1 Bedroom²
+
+
Unavailable
+
+ )}
+
+ {floorApartments.filter(
+ (apart) => apart.unitType === "2 BR Squared"
+ ).length > 0 && (
+
+
+
+
+ {
+ floorApartments.filter(
+ (apart) => apart.unitType === "2 BR Squared"
+ ).length
+ }
+
+
+
+ 2 Bedroom²
-
Studio Flex
+
Unavailable
-
Unavailable
-
-
-
-
-
- {
- floorApartments.filter(
- (apart) => apart.unitType === "Studio Squared"
- ).length
- }
-
-
-
Studio²
-
-
Unavailable
-
-
-
-
-
- {
- floorApartments.filter(
- (apart) => apart.unitType === "1 BR Squared"
- ).length
- }
-
-
-
1 Bedroom²
-
-
Unavailable
-
-
-
-
-
- {
- floorApartments.filter(
- (apart) => apart.unitType === "2 BR Squared"
- ).length
- }
-
-
-
2 Bedroom²
-
-
Unavailable
-
+ )}
{
return (
<>
-
*/}
+
+
+
+
>
);
diff --git a/client/src/components/header/Navbar/Navbar.tsx b/client/src/components/header/Navbar/Navbar.tsx
index 12610fc..43a450f 100644
--- a/client/src/components/header/Navbar/Navbar.tsx
+++ b/client/src/components/header/Navbar/Navbar.tsx
@@ -22,13 +22,14 @@ const Navbar = () => {
useEffect(() => {
const pathname = location.pathname;
+ console.log(pathname);
const tab = tabs.find((tab) => tab.path === pathname);
- const defaultTab = tabs[0];
if (tab) {
setSelectedTab(tab);
} else {
- setSelectedTab(defaultTab);
+ setSelectedTab(null);
}
+ console.log("tab", tab);
}, [location.pathname]);
useEffect(() => {
diff --git a/client/src/main.tsx b/client/src/main.tsx
index 82b8560..5a0b4f7 100644
--- a/client/src/main.tsx
+++ b/client/src/main.tsx
@@ -14,7 +14,8 @@ import UnitTypesItemPage from "./pages/UnitTypesItemPage";
import SearchPage2 from "./pages/SearchPage2";
import FavoritesPage2 from "./pages/FavoritesPage2";
import WithFooterLayout from "./layouts/WithFooterLayout";
-import AboutProjects2Page from "./pages/AboutProjects2Page";
+// import AboutProjects2Page from "./pages/AboutProjects2Page";
+import AboutProjectsPage from "./pages/AboutProjectsPage";
const router = createBrowserRouter([
{
@@ -49,7 +50,7 @@ const router = createBrowserRouter([
children: [
{
path: "about-projects",
- element:
,
+ element:
,
},
{
path: "about",