diff --git a/package.json b/package.json index 09aad1c..b327983 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,6 @@ "react-router-dom": "^6.22.3", "react-swipeable": "^7.0.1", "react-zoom-pan-pinch": "^3.4.4", - "usehooks-ts": "^3.1.0", "zustand": "^4.5.2" }, "devDependencies": { diff --git a/public/images/masterplan/compass.png b/public/images/masterplan/compass.png new file mode 100644 index 0000000..6abf7cb Binary files /dev/null and b/public/images/masterplan/compass.png differ diff --git a/src/components/Button.tsx b/src/components/Button.tsx index dabeeae..39cb5c1 100644 --- a/src/components/Button.tsx +++ b/src/components/Button.tsx @@ -1,8 +1,9 @@ import { backgroundColors, - backgroundHoverColors, textColors, -} from "../consts/buttonColors"; + borders, + paddings, +} from "../consts/buttonStyles"; import { ButtonType } from "../types/button"; interface ButtonProps { @@ -21,15 +22,16 @@ const Button = ({ onClick, }: ButtonProps) => { const backgroundColor = backgroundColors[buttonType]; - const backgroundHoverColor = backgroundHoverColors[buttonType]; const textColor = textColors[buttonType]; + const border = borders[buttonType]; + const padding = paddings[buttonType]; return ( + +

Disclaimer

+
+

+ This masterplan has been designed solely to provide an impression of + the Rove Home projects as well as the approximate location of + existing and proposed facilities, services, and destinations and is + not intended for any other purpose. +

+

+ All elements including the interior design used in the units and + images shown in the virtual tour are only for illustration. The + pictures of the proposed residential units, furniture, landscaping, + amenities, color schemes, fixtures, and accessories among all other + items are illustrative to showcase the units. +

+

+ IRTH does not make any representation or give any warranty + concerning the future developments shown, or the current or future + amenities, location, or existence of any facilities, services, and + destinations. Any indications of distance, sizes, travel times, and + any other information are approximate and for indicative purposes + only and are not to scale. +

+

+ IRTH gives notice that this virtual tour (including units, + amenities, plans of the property) does not constitute any part of a + sale offer or sale and purchase contract. +

+
+ + + ); +}; + +export default Disclaimer; diff --git a/src/components/modals/ZoomHint.tsx b/src/components/modals/ZoomHint.tsx index 0ce7661..6e09ea3 100644 --- a/src/components/modals/ZoomHint.tsx +++ b/src/components/modals/ZoomHint.tsx @@ -1,4 +1,3 @@ -import { useOnClickOutside } from "usehooks-ts"; import { useEffect, useRef, useState } from "react"; import SearchPlusIcon from "../icons/SearchIcon"; import OpenFullscreenIcon from "../icons/OpenFullscreenIcon"; @@ -19,7 +18,8 @@ const ZoomHint = () => { }, 300); }; - const handleClickOutside = () => { + const handleClick = () => { + console.log("first"); setIsTransparent(true); const timeOut = setTimeout(() => { @@ -29,19 +29,22 @@ const ZoomHint = () => { }; useEffect(() => { + window.addEventListener("click", handleClick); + window.addEventListener("touchstart", handleClick); + const map = document.querySelector(".react-transform-wrapper"); if (!map) return; map.addEventListener("wheel", handleOnScroll); return () => { map.removeEventListener("wheel", handleOnScroll); + window.removeEventListener("click", handleClick); + window.removeEventListener("touchstart", handleClick); }; }, []); - useOnClickOutside(ref, handleClickOutside); - return (
{ const { setModal } = useModal(); @@ -10,8 +12,10 @@ const Masterplan = () => { }, []); return ( -
+
+ +
); }; diff --git a/src/types/button.ts b/src/types/button.ts index d73a723..8cbf1cf 100644 --- a/src/types/button.ts +++ b/src/types/button.ts @@ -1,6 +1,6 @@ -type ButtonType = "primary" | "tertiary" | "cta"; -type ButtonColor = { +type ButtonType = "primary" | "tertiary" | "cta" | "fab"; +type ButtonStyle = { [key in ButtonType]: string; }; -export type { ButtonColor, ButtonType }; +export type { ButtonStyle, ButtonType }; diff --git a/yarn.lock b/yarn.lock index d8977ea..fc3eed1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1496,11 +1496,6 @@ locate-path@^6.0.0: dependencies: p-locate "^5.0.0" -lodash.debounce@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" - integrity sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow== - lodash.merge@^4.6.2: version "4.6.2" resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz" @@ -2130,13 +2125,6 @@ use-sync-external-store@1.2.0: resolved "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz" integrity sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA== -usehooks-ts@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/usehooks-ts/-/usehooks-ts-3.1.0.tgz#156119f36efc85f1b1952616c02580f140950eca" - integrity sha512-bBIa7yUyPhE1BCc0GmR96VU/15l/9gP1Ch5mYdLcFBaFGQsdmXkvjV0TtOqW1yUd6VjIwDunm+flSciCQXujiw== - dependencies: - lodash.debounce "^4.0.8" - util-deprecate@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz"