formated project with prettier

This commit is contained in:
PxlLoewe
2025-02-25 00:45:36 +01:00
parent c5b8a7c4cb
commit 22606b2137
95 changed files with 17771 additions and 17068 deletions

View File

@@ -1,28 +1,28 @@
'use client';
import { useEffect, useRef } from 'react';
"use client";
import { useEffect, useRef } from "react";
import L from 'leaflet';
import 'leaflet/dist/leaflet.css';
import L from "leaflet";
import "leaflet/dist/leaflet.css";
export default () => {
const mapRef = useRef<HTMLDivElement>(null);
const mapRef = useRef<HTMLDivElement>(null);
useEffect(() => {
if (!mapRef.current) return;
useEffect(() => {
if (!mapRef.current) return;
// Initialisiere die Leaflet-Karte
const map = L.map(mapRef.current).setView([51.1657, 10.4515], 6); // Deutschland
// Initialisiere die Leaflet-Karte
const map = L.map(mapRef.current).setView([51.1657, 10.4515], 6); // Deutschland
// OpenStreetMap Tile Layer hinzufügen
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution:
'&copy; <a href="https://www.openstreetmap.org/copyright">OSM</a> contributors',
}).addTo(map);
// OpenStreetMap Tile Layer hinzufügen
L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", {
attribution:
'&copy; <a href="https://www.openstreetmap.org/copyright">OSM</a> contributors',
}).addTo(map);
return () => {
map.remove(); // Karte beim Unmounten bereinigen
};
}, []);
return () => {
map.remove(); // Karte beim Unmounten bereinigen
};
}, []);
return <div ref={mapRef} className="w-full h-full rounded-lg shadow-lg" />;
return <div ref={mapRef} className="w-full h-full rounded-lg shadow-lg" />;
};