refactor: Add type definitions for map loader and remove unused imports and HydrateClient.

This commit is contained in:
2025-12-04 23:14:11 -05:00
parent de95255a1d
commit 75d6fe874b
4 changed files with 30 additions and 21 deletions

View File

@@ -1,6 +1,6 @@
"use client";
import { MapContainer, TileLayer, Marker, Popup } from 'react-leaflet';
import { MapContainer, TileLayer, Marker } from 'react-leaflet';
import 'leaflet/dist/leaflet.css';
import L from 'leaflet';
import { useEffect } from 'react';

View File

@@ -7,6 +7,19 @@ const Map = dynamic(() => import("./Map"), {
loading: () => <div className="w-full h-full bg-gray-100 animate-pulse flex items-center justify-center text-gray-400">Loading Map...</div>
});
export default function MapLoader({ shops, onShopSelect }: { shops: any[], onShopSelect: (shop: any) => void }) {
interface CoffeeShop {
id: number;
name: string;
description: string;
lat: number;
lng: number;
}
interface MapLoaderProps {
shops: CoffeeShop[];
onShopSelect: (shop: CoffeeShop) => void;
}
export default function MapLoader({ shops, onShopSelect }: MapLoaderProps) {
return <Map shops={shops} onShopSelect={onShopSelect} />;
}

View File

@@ -1,4 +1,3 @@
import Link from "next/link";
import { Coffee } from "lucide-react";
export default function Navbar() {