Skip to content

Commit

Permalink
Merge pull request #104 from swoocn/fix-bugs
Browse files Browse the repository at this point in the history
Self approved.
  • Loading branch information
swoocn authored Mar 14, 2024
2 parents 0ab0df1 + b443e00 commit 1d781c1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions frontend/src/app/home/map/map.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { Map, marker, Layer } from 'leaflet';
import { Router, RouterModule } from '@angular/router';
import { TranslateService } from '@ngx-translate/core';
import axios from 'axios';
import 'leaflet-routing-machine';
import * as L from 'leaflet';
import 'leaflet-routing-machine';

import { GeolocationService } from '../../core/service/geolocation.service';
import { ShopService } from '../../core/service/shop.service';
Expand Down Expand Up @@ -71,7 +71,7 @@ export class MapComponent implements OnInit {
try {
const response = await axios.get('https://api-mapofpi.vercel.app/shops');

console.log('From Map of Pi : ', response.data?.data);
// console.log('From Map of Pi : ', response.data?.data);

const shops: any[] = response.data?.data;

Expand All @@ -82,10 +82,10 @@ export class MapComponent implements OnInit {
this.updateTranslatedStrings();
this.addAllCoordinatesToMap();

console.log(
'All shops after fetching them from DB ',
this.allShops.map((shop) => shop.coordinates),
);
// console.log(
// 'All shops after fetching them from DB ',
// this.allShops.map((shop) => shop.coordinates),
// );
} catch (error) {
console.log(error);
}
Expand Down Expand Up @@ -129,7 +129,7 @@ export class MapComponent implements OnInit {

const { data } = location;

console.log('User data: ', data);
// console.log('User data: ', data);

const coordinates = [[data.latitude, data.longitude]];

Expand Down Expand Up @@ -251,7 +251,7 @@ export class MapComponent implements OnInit {
}
});
} else {
console.error(`Incomplete coordinates for shop ${shop.name}`);
//console.error(`Incomplete coordinates for shop ${shop.name}`);
}
});
}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
>Please enable JavaScript to continue using this application.</noscript
>

<script src="https://unpkg.com/leaflet-routing-machine@latest/dist/leaflet-routing-machine.js"></script>
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
<script src="https://unpkg.com/leaflet-routing-machine@latest/dist/leaflet-routing-machine.js"></script>
</body>
</html>

0 comments on commit 1d781c1

Please sign in to comment.