continuel event modal

This commit is contained in:
PxlLoewe
2025-02-28 08:44:47 +01:00
parent 0708e8a4c3
commit 488c50e2e0
5 changed files with 124 additions and 67 deletions

View File

@@ -2,43 +2,42 @@ import { PlaneIcon, Workflow } from "lucide-react";
import { useSession } from "next-auth/react";
interface HeaderProps {
isChecked: boolean;
handleCheckboxChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
isChecked: boolean;
handleCheckboxChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
}
export const Header = ({ isChecked, handleCheckboxChange }: HeaderProps) => {
const session = useSession();
console.log(session);
return (
<header className="flex justify-between items-center p-4">
<h1 className="text-2xl font-bold">
Hallo,{" "}
{session.status === "authenticated"
? session.data?.user.firstname
: "<username>"}
{"!"}
</h1>
<div>
<div className="tooltip" data-tip="Disponent / Pilot">
<label className="toggle text-base-content">
<input
type="checkbox"
checked={isChecked}
onChange={handleCheckboxChange}
/>
<Workflow
className="w-4 h-4"
viewBox="0 0 24 24"
aria-label="enabled"
/>
<PlaneIcon
className="w-4 h-4"
viewBox="0 0 24 24"
aria-label="disabled"
/>
</label>
</div>
</div>
</header>
);
const session = useSession();
return (
<header className="flex justify-between items-center p-4">
<h1 className="text-2xl font-bold">
Hallo,{" "}
{session.status === "authenticated"
? session.data?.user.firstname
: "<username>"}
{"!"}
</h1>
<div>
<div className="tooltip" data-tip="Disponent / Pilot">
<label className="toggle text-base-content">
<input
type="checkbox"
checked={isChecked}
onChange={handleCheckboxChange}
/>
<Workflow
className="w-4 h-4"
viewBox="0 0 24 24"
aria-label="enabled"
/>
<PlaneIcon
className="w-4 h-4"
viewBox="0 0 24 24"
aria-label="disabled"
/>
</label>
</div>
</div>
</header>
);
};