import { Transition } from "@headlessui/react"; import { Fragment, useState } from "react"; import { useOuterClick } from "../../../utils/shared/KeypressUtils"; //import { useAppData } from "~/utils/data/useAppData"; import UrlUtils from "../../../utils/app/UrlUtils"; import { useApp } from "../../../hooks"; import { useParams } from "next/navigation"; import Link from "next/link"; //import { EntitySimple } from "~/utils/db/entities/entities.db.server"; interface Props { //@ts-ignore entities: EntitySimple[]; className?: string; } export default function QuickActionsButton({ entities, className }: Props) { const { t } = useApp(); const params = useParams(); const appData: any = {}//useAppData(); const [opened, setOpened] = useState(false); const clickOutside = useOuterClick(() => setOpened(false)); return ( {appData.currentRole < 3 && (
    {entities.map((entity) => { return (
  • setOpened(false)} className="flex flex-col p-4 hover:bg-gray-50" >

    {t("shared.new")} {t(entity.title)}

    {/*

    {t("app.contracts.new.description")}

    */}
  • ); })}
)}
); }