This commit is contained in:
nocnico
2025-07-25 01:12:38 +02:00
20 changed files with 224 additions and 186 deletions

View File

@@ -113,7 +113,6 @@ export const SmartPopup = (
);
const handleConflict = useCallback(() => {
console.log("handleConflict in smartMarker", id, options);
const newAnchor = calculateAnchor(id, "popup", options);
setAnchor(newAnchor);
}, [id, options]);

View File

@@ -37,7 +37,7 @@ const Map = () => {
return (
<MapContainer
ref={ref}
className="flex-1 bg-base-200"
className="bg-base-200 z-10 flex-1"
center={map.center}
zoom={map.zoom}
fadeAnimation={false}

View File

@@ -0,0 +1,34 @@
"use client";
import { Changelog } from "@repo/db";
import { ChangelogModalBtn } from "@repo/shared-components";
import { useMutation } from "@tanstack/react-query";
import { editUserAPI } from "_querys/user";
import { useSession } from "next-auth/react";
import toast from "react-hot-toast";
export const ChangelogWrapper = ({ latestChangelog }: { latestChangelog: Changelog | null }) => {
const { data: session } = useSession();
const editUserMutation = useMutation({
mutationFn: editUserAPI,
});
const autoOpen = !session?.user.changelogAck && !!latestChangelog;
if (!latestChangelog) return null;
if (!session) return null;
return (
<ChangelogModalBtn
hideIcon
className="text-sm text-gray-500"
latestChangelog={latestChangelog}
autoOpen={autoOpen}
onClose={async () => {
await editUserMutation.mutateAsync({ id: session?.user.id, user: { changelogAck: true } });
if (!session?.user.changelogAck) {
toast.success("Changelog als gelesen markiert");
}
}}
/>
);
};