diff --git a/src/components/Map/MapMediaLayer.tsx b/src/components/Map/MapMediaLayer.tsx
index d751928..293a92b 100644
--- a/src/components/Map/MapMediaLayer.tsx
+++ b/src/components/Map/MapMediaLayer.tsx
@@ -34,7 +34,7 @@ export const MapMediaLayer = ({
useEffect(() => {
const allVillasImage = new ImageElement({
- image: "/images/map/Villas1.png",
+ image: "/images/map/Villas2.png",
georeference: new ExtentAndRotationGeoreference({
extent: extent,
}),
diff --git a/src/components/Map/MapView.tsx b/src/components/Map/MapView.tsx
index df21265..7e0f855 100644
--- a/src/components/Map/MapView.tsx
+++ b/src/components/Map/MapView.tsx
@@ -94,18 +94,12 @@ type MapViewComponentProps = {
export const MapViewComponent = (props: MapViewComponentProps) => {
const { children, className } = props;
- const { selectedOnMapVilla, setLoader, setModal, loader } = useStore();
+ const { selectedOnMapVilla, setLoader, setModal } = useStore();
const [isLoading, setIsLoading] = useState(true);
const [view, setView] = useState<__esri.MapView | undefined>();
const mapRef = useRef(null);
- useEffect(() => {
- // setLoader(
);
- console.log("isLoading", isLoading);
- console.log("loader", loader);
- });
-
useEffect(() => {
if (isLoading) {
setLoader(
);
diff --git a/src/components/ModalContainer.tsx b/src/components/ModalContainer.tsx
deleted file mode 100644
index 8547b54..0000000
--- a/src/components/ModalContainer.tsx
+++ /dev/null
@@ -1,32 +0,0 @@
-import { useEffect } from "react";
-import useStore from "../store/store";
-
-function ModalContainer() {
- const { modal, modalAnimation, setModal } = useStore();
-
- useEffect(() => {
- if (modalAnimation !== 1) return;
- const timeout = setTimeout(() => {
- setModal(null);
- }, 300);
-
- return clearTimeout(timeout);
- }, [modalAnimation]);
-
- if (modal) {
- return (
-
- {modal}
-
- );
- }
-}
-
-export default ModalContainer;
diff --git a/src/components/desktop/Appartment/ButtonPanel.tsx b/src/components/desktop/Appartment/ButtonPanel.tsx
index f4ec2ed..ab1c274 100644
--- a/src/components/desktop/Appartment/ButtonPanel.tsx
+++ b/src/components/desktop/Appartment/ButtonPanel.tsx
@@ -11,6 +11,7 @@ import ControlHelpModal from "./ControlHelpModal/ControlHelpModal";
import LayoutModal from "./LayoutModal";
import ImagesModal from "./ImagesModal";
import PedestrianIcon from "../../../icons/Pedestrianicon";
+import ModalAnimationContainer from "./ModalAnimationContainer";
type ButtonPanelProps = {
handleFullscreen: FullScreenHandle | null;
@@ -38,12 +39,20 @@ const ButtonPanel = ({ handleFullscreen }: ButtonPanelProps) => {
const handleOnLayoutClick = () => {
setModalAnimation(0);
- setModal(
);
+ setModal(
+
+
+
+ );
};
const handleOnImagesClick = () => {
setModalAnimation(0);
- setModal(
);
+ setModal(
+
+
+
+ );
};
return (
diff --git a/src/components/desktop/Appartment/ModalAnimationContainer.tsx b/src/components/desktop/Appartment/ModalAnimationContainer.tsx
new file mode 100644
index 0000000..6491172
--- /dev/null
+++ b/src/components/desktop/Appartment/ModalAnimationContainer.tsx
@@ -0,0 +1,34 @@
+import { useEffect } from "react";
+import useStore from "../../../store/store";
+
+type ModalContainerProps = {
+ children: React.ReactNode;
+};
+
+function ModalAnimationContainer({ children }: ModalContainerProps) {
+ const { modalAnimation, setModal } = useStore();
+
+ useEffect(() => {
+ if (modalAnimation !== 1) return;
+ const timeout = setTimeout(() => {
+ setModal(null);
+ }, 300);
+
+ return clearTimeout(timeout);
+ }, [modalAnimation]);
+
+ return (
+
+ {children}
+
+ );
+}
+
+export default ModalAnimationContainer;
diff --git a/src/components/desktop/Main/HouseList.tsx b/src/components/desktop/Main/HouseList.tsx
index 3c093c7..4f5ed7a 100644
--- a/src/components/desktop/Main/HouseList.tsx
+++ b/src/components/desktop/Main/HouseList.tsx
@@ -1,22 +1,25 @@
import HouseItem from "./HouseItem";
import { VILLAS } from "../../../consts/villas";
+
const enableVillas = ["a1t", "a1m", "b2t", "b2m"];
const HouseList = () => {
return (
-
-
- {VILLAS.map((villa) => {
- return (
-
- );
- })}
+ <>
+
+
+ {VILLAS.map((villa) => {
+ return (
+
+ );
+ })}
+
-
+ >
);
};
diff --git a/src/pages/Desktop/DesktopMainPage.tsx b/src/pages/Desktop/DesktopMainPage.tsx
index d866860..02f6bbe 100644
--- a/src/pages/Desktop/DesktopMainPage.tsx
+++ b/src/pages/Desktop/DesktopMainPage.tsx
@@ -1,16 +1,7 @@
-import { useEffect } from "react";
-import LoaderModal from "../../components/LoaderModal";
import MapComponent from "../../components/Map/Map";
import HouseList from "../../components/desktop/Main/HouseList";
-import useStore from "../../store/store";
const DesktopMainPage = () => {
- const { setLoader } = useStore();
-
- useEffect(() => {
- setLoader(
);
- }, []);
-
return (
<>
diff --git a/yarn.lock b/yarn.lock
index eb1bd61..544785d 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1223,11 +1223,6 @@ graphemer@^1.4.0:
resolved "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz"
integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==
-gsap@^3.12.5:
- version "3.12.5"
- resolved "https://registry.yarnpkg.com/gsap/-/gsap-3.12.5.tgz#136c02dad4c673b441bdb1ca00104bfcb4eae7f4"
- integrity sha512-srBfnk4n+Oe/ZnMIOXt3gT605BX9x5+rh/prT2F1SsNJsU1XuMiP0E2aptW481OnonOGACZWBqseH5Z7csHxhQ==
-
has-flag@^4.0.0:
version "4.0.0"
resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz"