Skip to content

Commit a76545a

Browse files
committed
Minor PR adjustments.
1 parent ebd5a98 commit a76545a

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

src/app/[locale]/page.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import Image from 'next/image';
88
import Link from 'next/link';
99
import { useContext, useEffect, useState, useRef } from 'react';
1010

11-
import { fetchSellers } from '@/services/sellerApi';
1211
import { Button } from '@/components/shared/Forms/Buttons/Buttons';
1312
import SearchBar from '@/components/shared/SearchBar/SearchBar';
13+
import { fetchSellers } from '@/services/sellerApi';
1414
import { fetchUserLocation } from '@/services/userSettingsApi';
1515

1616
import { AppContext } from '../../../context/AppContextProvider';
@@ -21,6 +21,7 @@ export default function Index() {
2121
const DynamicMap = dynamic(() => import('@/components/shared/map/Map'), {
2222
ssr: false,
2323
});
24+
const mapRef = useRef<L.Map | null>(null);
2425

2526
const [mapCenter, setMapCenter] = useState<{ lat: number; lng: number }>({
2627
lat: 0,
@@ -73,8 +74,6 @@ export default function Index() {
7374
}
7475
};
7576

76-
const mapRef = useRef<L.Map | null>(null);
77-
7877
// handle search query update from SearchBar and associated results
7978
const handleSearch = async (query: string) => {
8079
setSearchQuery(query);

src/components/shared/map/Map.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useTranslations } from 'next-intl';
2-
import React, { useEffect, useState, useCallback, useContext, useRef, MutableRefObject } from 'react';
2+
import React, { useEffect, useState, useCallback, useContext } from 'react';
33
import { MapContainer, Marker, Popup, TileLayer, useMapEvents } from 'react-leaflet';
44
import L, { LatLngExpression, LatLngBounds, LatLngTuple } from 'leaflet';
55
import _ from 'lodash';
@@ -42,7 +42,7 @@ const fetchSellerCoordinates = async (
4242
restricted to one shop at the time of registration. */
4343
const removeDuplicates = (sellers: ISellerWithSettings[]): ISellerWithSettings[] => {
4444
const uniqueSellers: { [key: string]: ISellerWithSettings } = {};
45-
sellers.forEach((seller) => {
45+
sellers.forEach(seller => {
4646
uniqueSellers[seller.seller_id] = seller;
4747
});
4848
return Object.values(uniqueSellers);

src/components/shared/map/MapCenter.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ const MapCenter = ({ entryType }: MapCenterProps) => {
228228
<Image
229229
src="/images/icons/scope.png"
230230
alt="Scope"
231-
layout="fill" // Automatically fills the parent container
231+
layout="fill"
232232
className="w-full h-full object-contain" // Ensure proper scaling
233233
/>
234234
</div>

0 commit comments

Comments
 (0)