This commit is contained in:
2024-07-29 19:47:43 +05:00
parent e381c5badc
commit 071a99189f
6 changed files with 64 additions and 28 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ const DefaultLayout = () => {
return (
<>
<FullScreen handle={onFullscreenHandle}>
<FullScreen handle={onFullscreenHandle} className="flex flex-col min-h-screen">
{isMobile ? <MobileHeader /> : <DesktopHeader />}
{modal}
<Outlet />
+33
View File
@@ -0,0 +1,33 @@
/* eslint-disable react-hooks/exhaustive-deps */
import { Outlet } from "react-router-dom";
import { isMobile } from "react-device-detect";
import { FullScreen, useFullScreenHandle } from "react-full-screen";
import { useEffect } from "react";
import useModal from "../store/useModal";
import useFullScreen from "../store/useFullScreen";
import DesktopHeader from "../components/header/Header/DesktopHeader";
import MobileHeader from "../components/header/Header/MobileHeader";
import Footer from "../components/Footer";
const WithoutFooterLayout = () => {
const { modal } = useModal();
const { setOnFullscreen } = useFullScreen();
const onFullscreenHandle = useFullScreenHandle();
useEffect(() => {
setOnFullscreen(onFullscreenHandle);
}, []);
return (
<>
<FullScreen handle={onFullscreenHandle} className="flex flex-col min-h-screen">
{isMobile ? <MobileHeader /> : <DesktopHeader />}
{modal}
<Outlet />
<Footer />
</FullScreen>
</>
);
};
export default WithoutFooterLayout;
+27 -20
View File
@@ -8,11 +8,12 @@ import ComplexWingPage from "./pages/ComplexWingPage";
import AboutProjectsPage from "./pages/AboutProjectsPage";
import UnitTypesPage from "./pages/UnitTypesPage";
import AboutPage from "./pages/AboutPage";
import ApartmentPage from "./pages/ApartmentPage";
// import ApartmentPage from "./pages/ApartmentPage";
import VirtualTourPage from "./pages/VirtualTourPage";
import UnitTypesItemPage from "./pages/UnitTypesItemPage";
import SearchPage2 from "./pages/SearchPage2";
import FavoritesPage2 from "./pages/FavoritesPage2";
import WithoutFooterLayout from "./layouts/WithFooterLayout";
const router = createBrowserRouter([
{
@@ -35,23 +36,20 @@ const router = createBrowserRouter([
path: "masterplan/:complexId/wing",
element: <ComplexWingPage />,
},
{
path: "virtual-tour/:unitType",
element: <VirtualTourPage />,
},
],
},
{
path: "/",
element: <WithoutFooterLayout />,
children: [
{
path: "about-projects",
element: <AboutProjectsPage />,
},
{
path: "unit-types",
children: [
{
index: true,
element: <UnitTypesPage />,
},
{
path: ":type",
element: <UnitTypesItemPage />,
},
],
},
{
path: "about",
element: <AboutPage />,
@@ -64,13 +62,22 @@ const router = createBrowserRouter([
path: "search",
element: <SearchPage2 />,
},
// {
// path: "search/:id",
// element: <ApartmentPage />,
// },
{
path: "search/:id",
element: <ApartmentPage />,
},
{
path: "virtual-tour/:unitType",
element: <VirtualTourPage />,
path: "unit-types",
children: [
{
index: true,
element: <UnitTypesPage />,
},
{
path: ":type",
element: <UnitTypesItemPage />,
},
],
},
],
},
-2
View File
@@ -2,7 +2,6 @@ import { isMobile } from "react-device-detect";
import OurStory from "../components/companyPage/OurStory";
import InvestmentPortfolio from "../components/companyPage/InvestmentPortfolio";
import OurValues from "../components/companyPage/OurValues/OurValues";
import Footer from "../components/Footer";
const AboutPage = () => {
return (
@@ -22,7 +21,6 @@ const AboutPage = () => {
</h1>
<InvestmentPortfolio />
<OurValues />
<Footer />
</section>
);
};
+2 -4
View File
@@ -1,5 +1,4 @@
import { isMobile } from "react-device-detect";
import Footer from "../components/Footer";
import Button from "../components/Button";
import LeftArrowIcon from "../components/icons/LeftArrowIcon";
import LivingSolutionSlider from "../components/aboutComplex/LivingSolutionSlider";
@@ -126,7 +125,7 @@ function AboutProjectsPage() {
};
return (
<>
<div className="overflow-x-hidden">
<section
className={`xl:pt-16 sm:pt-10 font-usual ${
isMobile ? "pt-16" : ""
@@ -486,8 +485,7 @@ function AboutProjectsPage() {
</div>
</div>
</section>
<Footer />
</>
</div>
);
}
+1 -1
View File
@@ -207,7 +207,7 @@ function FavoritesPage2() {
}
return (
<div className="pt-[58px]">
<div className="flex-1 pt-[58px]">
<div className="p-6">
<div className="pb-4 border-b border-[#E2E2DC] flex justify-between">
<p className="text-2xl font-semibold">