-
-
- {
- 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",