Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update map #32

Merged
merged 1 commit into from
Jul 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,22 @@
"@material-ui/core": "^4.12.4",
"@material-ui/icons": "^4.11.3",
"@plaiceholder/next": "^2.5.0",
"@prismicio/client": "^7.0.0",
"@prismicio/next": "^1.1.0",
"@prismicio/react": "^2.6.1",
"@trycourier/courier": "^4.2.0",
"@prismicio/client": "^7.1.0",
"@prismicio/next": "^1.3.3",
"@prismicio/react": "^2.7.1",
"@trycourier/courier": "^4.8.0",
"@types/recompose": "^0.30.10",
"@vercel/analytics": "^1.0.1",
"classnames": "^2.3.2",
"cloudinary-react": "^1.8.1",
"dayjs": "^1.11.7",
"dotenv": "^16.0.1",
"eslint-plugin-tailwindcss": "^3.12.0",
"eslint-plugin-tailwindcss": "^3.13.0",
"graphql": "^16.5.0",
"lucide-react": "^0.233.0",
"next": "^13.4.2",
"lucide-react": "^0.260.0",
"next": "^13.4.10",
"next-slicezone": "^0.2.6",
"photoswipe": "^5.3.7",
"photoswipe": "^5.3.8",
"plaiceholder": "^2.5.0",
"prismic-reactjs": "^1.3.4",
"react": "^18.2.0",
Expand All @@ -44,15 +44,15 @@
"sass": "^1.62.1",
"sharp": "^0.32.1",
"styled-components": "^6.0.0-rc.1",
"tailwind-merge": "^1.12.0",
"tailwind-merge": "^1.13.2",
"use-count-up": "^3.0.1",
"yet-another-react-lightbox": "^3.8.2",
"yet-another-react-lightbox": "^3.11.3",
"zod": "^3.21.4",
"zustand": "^4.3.8"
"zustand": "^4.3.9"
},
"scripts": {
"dev": "prismic-next clear-cache && next dev",
"build": "prismic-next clear-cache && next build",
"dev": "next dev",
"build": "next build",
"start": "next start",
"slicemachine": "start-slicemachine",
"format": "prettier --write .",
Expand Down Expand Up @@ -84,18 +84,18 @@
"babel-plugin-macros": "^3.1.0",
"babel-plugin-styled-components": "^2.1.1",
"eslint": "8.17.0",
"eslint-config-next": "13.4.2",
"eslint-config-next": "13.4.10",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-react": "^7.32.2",
"postcss": "^8.4.23",
"prettier": "^2.8.8",
"prettier-plugin-tailwindcss": "^0.3.0",
"prettier": "^3.0.0",
"prettier-plugin-tailwindcss": "^0.4.1",
"pretty-quick": "^3.1.3",
"prismic-ts-codegen": "^0.1.7",
"slice-machine-ui": "^1.0.3",
"tailwindcss": "^3.3.2",
"ts-essentials": "^9.3.1",
"prismic-ts-codegen": "^0.1.15",
"slice-machine-ui": "^1.5.1",
"tailwindcss": "^3.3.3",
"ts-essentials": "^9.3.2",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.0.4"
"typescript": "^5.1.6"
}
}
20 changes: 8 additions & 12 deletions src/components/Shared/Contact/Map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,6 @@ import {
} from "react-google-maps";
import { compose, withStateHandlers } from "recompose";

const coordinates = {
lat: 32.0723871,
lng: 34.8140164,
};

const labelUrl =
"https://www.google.com/maps/place/%D7%A6%D7%A4%D7%A8%D7%99%D7%A8+%D7%9C%D7%99%D7%9B%D7%98%D7%A0%D7" +
"%A9%D7%98%D7%99%D7%99%D7%9F+%D7%9C%D7%99%D7%9E%D7%95%D7%93+%D7%AA%D7%95%D7%A4%D7%99%D7%9D%E2%80%AD/" +
"@32.072442,34.813721,16z/data=!4m5!3m4!1s0x0:0xc28cd9557039a526!8m2!3d32.0724757!4d34.8140216?hl=he-IL";

const MapLabel: React.FC<
Pick<MapProps, "map_label_link" | "map_label_text">
> = ({ map_label_link, map_label_text }) => (
Expand All @@ -33,6 +23,7 @@ const MapLabel: React.FC<
</div>
);


type MapProps = {
onToggleOpen: () => void;
isOpen: boolean;
Expand Down Expand Up @@ -66,9 +57,14 @@ const MapWithAMakredInfoWindow = compose<MapProps, MapProps>(
map_lat,
map_lng,
} = props;

const coordinates = {
lat: map_lat,
lng: map_lng
};
return (
// @ts-ignore
<GoogleMap defaultZoom={16} defaultCenter={{ lat: map_lat, lng: map_lng }}>
<GoogleMap defaultZoom={16} defaultCenter={coordinates}>
{/* @ts-ignore */}
<Marker position={coordinates} onClick={onToggleOpen}>
{/* @ts-ignore */}
Expand All @@ -86,4 +82,4 @@ const MapWithAMakredInfoWindow = compose<MapProps, MapProps>(
);
});

export default MapWithAMakredInfoWindow;
export default MapWithAMakredInfoWindow;
1 change: 0 additions & 1 deletion tsconfig.tsbuildinfo

This file was deleted.

Loading