"use client";
import ModeSwitchDropdown from "_components/navbar/ModeSwitchDropdown";
import { useSession } from "next-auth/react";
import dynamic from "next/dynamic";
import { ConnectedDispatcher } from "./_components/ConnectedDispatcher";

const Map = dynamic(() => import("_components/map/Map"), {
	ssr: false,
});

const Page = () => {
	const session = useSession();
	return (
		<>
			<Map />
			<div className="flex gap-3 absolute top-5 right-10 z-99999">
				<ConnectedDispatcher />
				{session.status === "authenticated" && <ModeSwitchDropdown className="dropdown-end" />}
			</div>
		</>
	);
};

export default Page;
