Skip to content
This repository has been archived by the owner on Dec 31, 2023. It is now read-only.

Commit

Permalink
Merge branch 'main' of https://github.com/HutechCJ/ProfioApp
Browse files Browse the repository at this point in the history
  • Loading branch information
foxminchan committed Sep 30, 2023
2 parents 3a125e7 + 0c78529 commit 375311f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions apps/cms/app/(dash)/orders/[orderId]/GoogleMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function GoogleMapComponent({ orderId }: { orderId: string }) {
const directionsCallback = React.useCallback(
(
result: google.maps.DirectionsResult | null,
status: google.maps.DirectionsStatus
status: google.maps.DirectionsStatus,
) => {
if (result !== null) {
if (status === 'OK') {
Expand All @@ -73,7 +73,7 @@ function GoogleMapComponent({ orderId }: { orderId: string }) {
}
}
},
[]
[],
);

const trackCurrentOrderLocation = React.useCallback(() => {
Expand All @@ -100,11 +100,11 @@ function GoogleMapComponent({ orderId }: { orderId: string }) {
const bounds = new window.google.maps.LatLngBounds();
const origin = new window.google.maps.LatLng(
orderHubsPathApiRes.data.items[0].location.latitude,
orderHubsPathApiRes.data.items[0].location.longitude
orderHubsPathApiRes.data.items[0].location.longitude,
);
const destination = new window.google.maps.LatLng(
orderHubsPathApiRes.data.items[1].location.latitude,
orderHubsPathApiRes.data.items[1].location.longitude
orderHubsPathApiRes.data.items[1].location.longitude,
);

setDirectionsServiceOptions({
Expand All @@ -126,7 +126,7 @@ function GoogleMapComponent({ orderId }: { orderId: string }) {
setOrderLocation((oldLocation) => {
const newLocation = new window.google.maps.LatLng(
message.latitude,
message.longitude
message.longitude,
);

if (oldLocation !== null) {
Expand Down

0 comments on commit 375311f

Please sign in to comment.