mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-11-08 20:33:41 +00:00
Co-authored-by: Alejandro Bailo <59607668+alejandrobailo@users.noreply.github.com> Co-authored-by: alejandrobailo <alejandrobailo94@gmail.com>
52 lines
1.1 KiB
TypeScript
52 lines
1.1 KiB
TypeScript
"use client";
|
|
|
|
import { SettingsIcon } from "lucide-react";
|
|
|
|
import { CustomAlertModal, CustomButton } from "@/components/ui/custom";
|
|
import { useUIStore } from "@/store/ui/store";
|
|
|
|
import { MutedFindingsConfigForm } from "./forms";
|
|
|
|
export const MutedFindingsConfigButton = () => {
|
|
const {
|
|
isMutelistModalOpen,
|
|
openMutelistModal,
|
|
closeMutelistModal,
|
|
hasProviders,
|
|
} = useUIStore();
|
|
|
|
const handleOpenModal = () => {
|
|
if (hasProviders) {
|
|
openMutelistModal();
|
|
}
|
|
};
|
|
|
|
return (
|
|
<>
|
|
<CustomAlertModal
|
|
isOpen={isMutelistModalOpen}
|
|
onOpenChange={closeMutelistModal}
|
|
title="Configure Mutelist"
|
|
size="3xl"
|
|
>
|
|
<MutedFindingsConfigForm
|
|
setIsOpen={closeMutelistModal}
|
|
onCancel={closeMutelistModal}
|
|
/>
|
|
</CustomAlertModal>
|
|
|
|
<CustomButton
|
|
ariaLabel="Configure Mutelist"
|
|
variant="dashed"
|
|
color="warning"
|
|
size="md"
|
|
startContent={<SettingsIcon size={20} />}
|
|
onPress={handleOpenModal}
|
|
isDisabled={!hasProviders}
|
|
>
|
|
Configure Mutelist
|
|
</CustomButton>
|
|
</>
|
|
);
|
|
};
|