From 7973c15e3fba3a18e4a25efd225371b2a70fe122 Mon Sep 17 00:00:00 2001 From: hamzaobed7 Date: Tue, 4 Aug 2026 12:51:47 +0300 Subject: [PATCH] fixd larg lines in HomePage , add cookies rather than localStorage,make canvas background Login page --- .vscode/settings.json | 3 + app/ClientLayout.js | 420 +++++------- app/HelperFunction/ApiProperty.js | 57 ++ app/account-verification/page.js | 10 +- app/auth/choose-role/loading.js | 14 - app/auth/choose-role/page.js | 4 +- app/blocked/page.js | 89 ++- app/change-password/page.js | 2 +- app/components/Background.js | 113 ++++ app/components/PropertyMapWithMarkers.js | 40 +- app/components/home/ArrowForScroll.js | 28 + app/components/home/FeatureSection.js | 21 + app/components/home/FeaturesOurCompany.js | 21 + app/components/home/FilterSelect.js | 32 + app/components/home/HeroSearch.js | 388 +++-------- app/components/home/HeroSection.js | 54 ++ app/components/home/HomeClient.jsx | 73 +++ app/components/home/MapSection.js | 80 +++ app/components/home/ShowIfOwner.js | 26 + app/components/home/showLoginDialog.js | 38 ++ app/contexts/ThemeContext.js | 2 +- app/favicon.ico | Bin 25931 -> 60251 bytes app/forgot-password/loading.js | 14 - app/forgot-password/page.js | 2 +- app/hooks/UseFilterOfHeroSearch.js | 57 ++ app/hooks/useApplyFilters.js | 99 +++ app/hooks/useAuth.js | 18 + app/loading.js | 36 +- app/login/loading.js | 14 - app/login/page.js | 256 ++------ app/owner/account-book/page.js | 183 ++---- app/owner/bookings/loading.js | 14 - app/owner/calendar/loading.js | 14 - app/owner/profits/loading.js | 14 - app/page.js | 605 +----------------- app/profile/loading.js | 14 - app/properties/loading.js | 14 - app/property/[id]/PropertyDetail.js | 744 +++++----------------- app/property/[id]/loading.js | 14 - app/property/[id]/page.js | 47 +- app/register/agent/page.js | 2 +- app/register/owner/loading.js | 14 - app/register/owner/page.js | 2 +- app/register/tenant/loading.js | 14 - app/register/tenant/page.js | 2 +- app/services/AuthService.js | 38 +- app/support/page.js | 102 +-- app/utils/api.js | 167 ++--- package-lock.json | 7 + package.json | 1 + public/hero.jpg | Bin 14588161 -> 2376538 bytes 51 files changed, 1460 insertions(+), 2563 deletions(-) create mode 100644 .vscode/settings.json create mode 100644 app/HelperFunction/ApiProperty.js delete mode 100644 app/auth/choose-role/loading.js create mode 100644 app/components/Background.js create mode 100644 app/components/home/ArrowForScroll.js create mode 100644 app/components/home/FeatureSection.js create mode 100644 app/components/home/FeaturesOurCompany.js create mode 100644 app/components/home/FilterSelect.js create mode 100644 app/components/home/HeroSection.js create mode 100644 app/components/home/HomeClient.jsx create mode 100644 app/components/home/MapSection.js create mode 100644 app/components/home/ShowIfOwner.js create mode 100644 app/components/home/showLoginDialog.js delete mode 100644 app/forgot-password/loading.js create mode 100644 app/hooks/UseFilterOfHeroSearch.js create mode 100644 app/hooks/useApplyFilters.js create mode 100644 app/hooks/useAuth.js delete mode 100644 app/login/loading.js delete mode 100644 app/owner/bookings/loading.js delete mode 100644 app/owner/calendar/loading.js delete mode 100644 app/owner/profits/loading.js delete mode 100644 app/profile/loading.js delete mode 100644 app/properties/loading.js delete mode 100644 app/property/[id]/loading.js delete mode 100644 app/register/owner/loading.js delete mode 100644 app/register/tenant/loading.js diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..74f938d --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "i18n-ally-next.localesPaths": ["app/i18n"] +} diff --git a/app/ClientLayout.js b/app/ClientLayout.js index 446cecc..cb54fb7 100644 --- a/app/ClientLayout.js +++ b/app/ClientLayout.js @@ -5,7 +5,7 @@ import { useTranslation } from "react-i18next"; import Link from "next/link"; import Image from "next/image"; import { NavLink, MobileNavLink } from "./components/NavLinks"; -import BottomNav from './components/BottomNav'; +import BottomNav from "./components/BottomNav"; import { Globe, LogIn, @@ -16,25 +16,16 @@ import { Building, PlusCircle, Heart, - MessageCircle, Settings, - Edit, Phone, Mail, - MapPin, - Camera, Bell, - Home, - ChevronDown, Menu, X, TrendingUp, CalendarDays, - Clock, DollarSign, Star, - Moon, - Sun, FileText, } from "lucide-react"; import { useState, useEffect, useRef } from "react"; @@ -43,8 +34,9 @@ import AuthService from "./services/AuthService"; import { UserRole, UserRoleLabels } from "./enums/UserRole"; import "./i18n/config"; import NotificationHandler from "./components/NotificationHandler"; -import { useTheme } from '@/app/contexts/ThemeContext'; -import { useNotifications } from '@/app/contexts/NotificationsContext'; + +import { useNotifications } from "@/app/contexts/NotificationsContext"; +import Loading from "./loading"; export default function ClientLayout({ children }) { const { t, i18n } = useTranslation(); @@ -56,7 +48,7 @@ export default function ClientLayout({ children }) { const [isMounted, setIsMounted] = useState(false); const currentYear = new Date().getFullYear(); const menuRef = useRef(null); - const { theme, toggleTheme } = useTheme(); + const { unreadCount } = useNotifications(); useEffect(() => { @@ -128,13 +120,7 @@ export default function ClientLayout({ children }) { window.location.href = "/"; }; - const isAuthPage = [ - "/login", - "/blocked", - "/register", - "/forgot-password", - "/auth/choose-role", - ].includes(pathname); + const isAuthPage = ["/login", "/blocked", "/register", "/forgot-password", "/auth/choose-role"].includes(pathname); const isProfilePage = pathname === "/profile"; const isHomePage = pathname === "/"; @@ -154,64 +140,52 @@ export default function ClientLayout({ children }) { if (!isMounted) { return ( -
-
-
-

{t("loading")}

-
-
+ ); } return (
{!isAuthPage && !isAuthenticated && ( -