upgrade Nodemailer to v10

fix dead code with knip

upgrade TS to v6 and fix linting errors

auto apply oxfmt rules

fix linting errors - unused deps etc

ignore file

remove all ignored files in knip

add knip - dead code analysis tool

swap prettier and eslint of oxfmt and oxlint

fix: fix map rendering in react strict mode

fix: headlessUI float replace

fix: disable Matomo if not URL and SITE ID exist

upgrade: 1st pass upgrade to Next.js v16

deps: upgrade react to v19
This commit is contained in:
2026-09-29 22:16:07 +02:00
parent df3a73df88
commit da78e82a44
122 changed files with 39491 additions and 32785 deletions
+34 -46
View File
@@ -1,6 +1,5 @@
import React from "react";
import { Float } from "@headlessui-float/react";
import { Menu, MenuButton, MenuItem, MenuItems } from "@headlessui/react";
import { IoMdMore } from "react-icons/io";
import { twMerge } from "tailwind-merge";
@@ -18,54 +17,43 @@ type DropdownMenuProps = {
containerClassName?: string;
};
export const DropdownMenu = ({
items,
buttonComponent,
containerClassName,
}: DropdownMenuProps) => {
export const DropdownMenu = ({ items, buttonComponent, containerClassName }: DropdownMenuProps) => {
return (
<Menu as="div" className={twMerge("relative", containerClassName)}>
<Float
portal
placement="bottom-end"
offset={15}
enter="transition ease-out duration-100"
enterFrom="transform opacity-0 scale-95"
enterTo="transform opacity-100 scale-100"
leave="transition ease-in duration-75"
leaveFrom="transform opacity-100 scale-100"
leaveTo="transform opacity-0 scale-95"
>
{buttonComponent ?? (
<MenuButton>
<IoMdMore />
</MenuButton>
)}
{buttonComponent ?? (
<MenuButton>
<IoMdMore />
</MenuButton>
)}
<MenuItems className="z-20 flex w-auto items-start overflow-hidden rounded-md bg-neutral-200 focus:outline-none dark:bg-neutral-600">
<div className="flex flex-col px-1 py-1">
{items.map(({ title, onClick, className, disabled }, i) => (
<MenuItem key={i}>
<button
type="button"
className={twMerge(
"w-full whitespace-nowrap rounded-md px-2.5 py-2 text-left text-sm text-black dark:text-white",
!disabled && "hover:bg-white dark:hover:bg-neutral-700",
disabled && "text-neutral-500 dark:text-neutral-500",
className,
)}
disabled={disabled ?? false}
onClick={() => {
if (!disabled) onClick();
}}
>
{title}
</button>
</MenuItem>
))}
</div>
</MenuItems>
</Float>
<MenuItems
anchor={{ to: "bottom end", gap: 15 }}
portal
transition
className="z-20 flex w-auto items-start overflow-hidden rounded-md bg-neutral-200 transition ease-out data-[closed]:scale-95 data-[closed]:opacity-0 focus:outline-none dark:bg-neutral-600"
>
<div className="flex flex-col px-1 py-1">
{items.map(({ title, onClick, className, disabled }, i) => (
<MenuItem key={i}>
<button
type="button"
className={twMerge(
"w-full whitespace-nowrap rounded-md px-2.5 py-2 text-left text-sm text-black dark:text-white",
!disabled && "hover:bg-white dark:hover:bg-neutral-700",
disabled && "text-neutral-500 dark:text-neutral-500",
className,
)}
disabled={disabled ?? false}
onClick={() => {
if (!disabled) onClick();
}}
>
{title}
</button>
</MenuItem>
))}
</div>
</MenuItems>
</Menu>
);
};