"use client"; import { useSession } from "next-auth/react"; import { connectionStore } from "../../_store/connectionStore"; import { useEffect } from "react"; import { CheckCircledIcon } from "@radix-ui/react-icons"; export const ConnectBtn = () => { return ( <>

Als Disponent anmelden

Du kannst diese Zeit später noch anpassen.

); }; export const ConnectedBtn = () => { return ( <>

Verbunden als <LST_01>

); }; export const Connection = () => { const session = useSession(); const cStore = connectionStore((state) => state); const uid = session.data?.user?.id; useEffect(() => { if (uid) { cStore.connect(uid); } }, [uid]); return
{cStore.isConnected ? : }
; };