mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-01-25 02:08:11 +00:00
refactor(ui): migrate CustomAlertModal to shadcn Modal
This commit is contained in:
@@ -14,8 +14,8 @@ import {
|
|||||||
import { DeleteLLMProviderForm } from "@/components/lighthouse/forms/delete-llm-provider-form";
|
import { DeleteLLMProviderForm } from "@/components/lighthouse/forms/delete-llm-provider-form";
|
||||||
import { WorkflowConnectLLM } from "@/components/lighthouse/workflow";
|
import { WorkflowConnectLLM } from "@/components/lighthouse/workflow";
|
||||||
import { Button } from "@/components/shadcn";
|
import { Button } from "@/components/shadcn";
|
||||||
|
import { Modal } from "@/components/shadcn/modal";
|
||||||
import { NavigationHeader } from "@/components/ui";
|
import { NavigationHeader } from "@/components/ui";
|
||||||
import { CustomAlertModal } from "@/components/ui/custom";
|
|
||||||
import type { LighthouseProvider } from "@/types/lighthouse";
|
import type { LighthouseProvider } from "@/types/lighthouse";
|
||||||
|
|
||||||
interface ConnectLLMLayoutProps {
|
interface ConnectLLMLayoutProps {
|
||||||
@@ -63,8 +63,8 @@ export default function ConnectLLMLayout({ children }: ConnectLLMLayoutProps) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<CustomAlertModal
|
<Modal
|
||||||
isOpen={isDeleteOpen}
|
open={isDeleteOpen}
|
||||||
onOpenChange={setIsDeleteOpen}
|
onOpenChange={setIsDeleteOpen}
|
||||||
title="Are you absolutely sure?"
|
title="Are you absolutely sure?"
|
||||||
description="This action cannot be undone. This will permanently delete your LLM provider configuration and remove your data from the server."
|
description="This action cannot be undone. This will permanently delete your LLM provider configuration and remove your data from the server."
|
||||||
@@ -73,7 +73,7 @@ export default function ConnectLLMLayout({ children }: ConnectLLMLayoutProps) {
|
|||||||
providerType={provider}
|
providerType={provider}
|
||||||
setIsOpen={setIsDeleteOpen}
|
setIsOpen={setIsDeleteOpen}
|
||||||
/>
|
/>
|
||||||
</CustomAlertModal>
|
</Modal>
|
||||||
|
|
||||||
<NavigationHeader
|
<NavigationHeader
|
||||||
title={isEditMode ? "Configure LLM Provider" : "Connect LLM Provider"}
|
title={isEditMode ? "Configure LLM Provider" : "Connect LLM Provider"}
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ import {
|
|||||||
updateMutedFindingsConfig,
|
updateMutedFindingsConfig,
|
||||||
} from "@/actions/processors";
|
} from "@/actions/processors";
|
||||||
import { Button, Card, Skeleton } from "@/components/shadcn";
|
import { Button, Card, Skeleton } from "@/components/shadcn";
|
||||||
|
import { Modal } from "@/components/shadcn/modal";
|
||||||
import { useToast } from "@/components/ui";
|
import { useToast } from "@/components/ui";
|
||||||
import { CustomAlertModal } from "@/components/ui/custom";
|
|
||||||
import { CustomLink } from "@/components/ui/custom/custom-link";
|
import { CustomLink } from "@/components/ui/custom/custom-link";
|
||||||
import { fontMono } from "@/config/fonts";
|
import { fontMono } from "@/config/fonts";
|
||||||
import {
|
import {
|
||||||
@@ -152,8 +152,8 @@ export function AdvancedMutelistForm() {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{/* Delete Confirmation Modal */}
|
{/* Delete Confirmation Modal */}
|
||||||
<CustomAlertModal
|
<Modal
|
||||||
isOpen={showDeleteConfirmation}
|
open={showDeleteConfirmation}
|
||||||
onOpenChange={setShowDeleteConfirmation}
|
onOpenChange={setShowDeleteConfirmation}
|
||||||
title="Delete Mutelist Configuration"
|
title="Delete Mutelist Configuration"
|
||||||
size="md"
|
size="md"
|
||||||
@@ -185,7 +185,7 @@ export function AdvancedMutelistForm() {
|
|||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</CustomAlertModal>
|
</Modal>
|
||||||
|
|
||||||
<Card variant="base" className="p-6">
|
<Card variant="base" className="p-6">
|
||||||
<form action={formAction} className="flex flex-col gap-4">
|
<form action={formAction} className="flex flex-col gap-4">
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import { useActionState, useEffect, useRef, useState } from "react";
|
|||||||
import { deleteMuteRule } from "@/actions/mute-rules";
|
import { deleteMuteRule } from "@/actions/mute-rules";
|
||||||
import { MuteRuleData } from "@/actions/mute-rules/types";
|
import { MuteRuleData } from "@/actions/mute-rules/types";
|
||||||
import { Button } from "@/components/shadcn";
|
import { Button } from "@/components/shadcn";
|
||||||
|
import { Modal } from "@/components/shadcn/modal";
|
||||||
import { useToast } from "@/components/ui";
|
import { useToast } from "@/components/ui";
|
||||||
import { CustomAlertModal } from "@/components/ui/custom";
|
|
||||||
import { DataTable } from "@/components/ui/table";
|
import { DataTable } from "@/components/ui/table";
|
||||||
import { MetaDataProps } from "@/types";
|
import { MetaDataProps } from "@/types";
|
||||||
|
|
||||||
@@ -82,8 +82,8 @@ export function MuteRulesTableClient({
|
|||||||
|
|
||||||
{/* Edit Modal */}
|
{/* Edit Modal */}
|
||||||
{selectedMuteRule && (
|
{selectedMuteRule && (
|
||||||
<CustomAlertModal
|
<Modal
|
||||||
isOpen={editModal.isOpen}
|
open={editModal.isOpen}
|
||||||
onOpenChange={editModal.onOpenChange}
|
onOpenChange={editModal.onOpenChange}
|
||||||
title="Edit Mute Rule"
|
title="Edit Mute Rule"
|
||||||
size="lg"
|
size="lg"
|
||||||
@@ -93,13 +93,13 @@ export function MuteRulesTableClient({
|
|||||||
onSuccess={handleEditSuccess}
|
onSuccess={handleEditSuccess}
|
||||||
onCancel={editModal.onClose}
|
onCancel={editModal.onClose}
|
||||||
/>
|
/>
|
||||||
</CustomAlertModal>
|
</Modal>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* Delete Confirmation Modal */}
|
{/* Delete Confirmation Modal */}
|
||||||
{selectedMuteRule && (
|
{selectedMuteRule && (
|
||||||
<CustomAlertModal
|
<Modal
|
||||||
isOpen={deleteModal.isOpen}
|
open={deleteModal.isOpen}
|
||||||
onOpenChange={deleteModal.onOpenChange}
|
onOpenChange={deleteModal.onOpenChange}
|
||||||
title="Delete Mute Rule"
|
title="Delete Mute Rule"
|
||||||
size="md"
|
size="md"
|
||||||
@@ -138,7 +138,7 @@ export function MuteRulesTableClient({
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</CustomAlertModal>
|
</Modal>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ import {
|
|||||||
|
|
||||||
import { createMuteRule } from "@/actions/mute-rules";
|
import { createMuteRule } from "@/actions/mute-rules";
|
||||||
import { MuteRuleActionState } from "@/actions/mute-rules/types";
|
import { MuteRuleActionState } from "@/actions/mute-rules/types";
|
||||||
|
import { Modal } from "@/components/shadcn/modal";
|
||||||
import { useToast } from "@/components/ui";
|
import { useToast } from "@/components/ui";
|
||||||
import { CustomAlertModal } from "@/components/ui/custom";
|
|
||||||
import { FormButtons } from "@/components/ui/form";
|
import { FormButtons } from "@/components/ui/form";
|
||||||
|
|
||||||
interface MuteFindingsModalProps {
|
interface MuteFindingsModalProps {
|
||||||
@@ -44,6 +44,7 @@ export function MuteFindingsModal({
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (state?.success) {
|
if (state?.success) {
|
||||||
|
console.log("[MuteFindingsModal] success, calling onComplete:", !!onCompleteRef.current);
|
||||||
toast({
|
toast({
|
||||||
title: "Success",
|
title: "Success",
|
||||||
description: state.success,
|
description: state.success,
|
||||||
@@ -65,8 +66,8 @@ export function MuteFindingsModal({
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<CustomAlertModal
|
<Modal
|
||||||
isOpen={isOpen}
|
open={isOpen}
|
||||||
onOpenChange={onOpenChange}
|
onOpenChange={onOpenChange}
|
||||||
title="Mute Findings"
|
title="Mute Findings"
|
||||||
size="lg"
|
size="lg"
|
||||||
@@ -125,6 +126,6 @@ export function MuteFindingsModal({
|
|||||||
isDisabled={isPending}
|
isDisabled={isPending}
|
||||||
/>
|
/>
|
||||||
</form>
|
</form>
|
||||||
</CustomAlertModal>
|
</Modal>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ import {
|
|||||||
sendFindingToJira,
|
sendFindingToJira,
|
||||||
} from "@/actions/integrations/jira-dispatch";
|
} from "@/actions/integrations/jira-dispatch";
|
||||||
import { JiraIcon } from "@/components/icons/services/IconServices";
|
import { JiraIcon } from "@/components/icons/services/IconServices";
|
||||||
|
import { Modal } from "@/components/shadcn/modal";
|
||||||
import { useToast } from "@/components/ui";
|
import { useToast } from "@/components/ui";
|
||||||
import { CustomAlertModal } from "@/components/ui/custom";
|
|
||||||
import { CustomBanner } from "@/components/ui/custom/custom-banner";
|
import { CustomBanner } from "@/components/ui/custom/custom-banner";
|
||||||
import {
|
import {
|
||||||
Form,
|
Form,
|
||||||
@@ -215,8 +215,8 @@ export const SendToJiraModal = ({
|
|||||||
// }, [issueTypes, searchIssueTypeValue]);
|
// }, [issueTypes, searchIssueTypeValue]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<CustomAlertModal
|
<Modal
|
||||||
isOpen={isOpen}
|
open={isOpen}
|
||||||
onOpenChange={onOpenChange}
|
onOpenChange={onOpenChange}
|
||||||
title="Send Finding to Jira"
|
title="Send Finding to Jira"
|
||||||
description={
|
description={
|
||||||
@@ -389,6 +389,6 @@ export const SendToJiraModal = ({
|
|||||||
)}
|
)}
|
||||||
</form>
|
</form>
|
||||||
</Form>
|
</Form>
|
||||||
</CustomAlertModal>
|
</Modal>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ import {
|
|||||||
IntegrationSkeleton,
|
IntegrationSkeleton,
|
||||||
} from "@/components/integrations/shared";
|
} from "@/components/integrations/shared";
|
||||||
import { Button } from "@/components/shadcn";
|
import { Button } from "@/components/shadcn";
|
||||||
|
import { Modal } from "@/components/shadcn/modal";
|
||||||
import { useToast } from "@/components/ui";
|
import { useToast } from "@/components/ui";
|
||||||
import { CustomAlertModal } from "@/components/ui/custom";
|
|
||||||
import { DataTablePagination } from "@/components/ui/table/data-table-pagination";
|
import { DataTablePagination } from "@/components/ui/table/data-table-pagination";
|
||||||
import { triggerTestConnectionWithDelay } from "@/lib/integrations/test-connection-helper";
|
import { triggerTestConnectionWithDelay } from "@/lib/integrations/test-connection-helper";
|
||||||
import { MetaDataProps } from "@/types";
|
import { MetaDataProps } from "@/types";
|
||||||
@@ -209,8 +209,8 @@ export const JiraIntegrationsManager = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<CustomAlertModal
|
<Modal
|
||||||
isOpen={isDeleteOpen}
|
open={isDeleteOpen}
|
||||||
onOpenChange={setIsDeleteOpen}
|
onOpenChange={setIsDeleteOpen}
|
||||||
title="Delete Jira Integration"
|
title="Delete Jira Integration"
|
||||||
description="This action cannot be undone. This will permanently delete your Jira integration."
|
description="This action cannot be undone. This will permanently delete your Jira integration."
|
||||||
@@ -243,10 +243,10 @@ export const JiraIntegrationsManager = ({
|
|||||||
{isDeleting ? "Deleting..." : "Delete"}
|
{isDeleting ? "Deleting..." : "Delete"}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</CustomAlertModal>
|
</Modal>
|
||||||
|
|
||||||
<CustomAlertModal
|
<Modal
|
||||||
isOpen={isModalOpen}
|
open={isModalOpen}
|
||||||
onOpenChange={setIsModalOpen}
|
onOpenChange={setIsModalOpen}
|
||||||
title={
|
title={
|
||||||
editingIntegration
|
editingIntegration
|
||||||
@@ -259,7 +259,7 @@ export const JiraIntegrationsManager = ({
|
|||||||
onSuccess={handleFormSuccess}
|
onSuccess={handleFormSuccess}
|
||||||
onCancel={handleModalClose}
|
onCancel={handleModalClose}
|
||||||
/>
|
/>
|
||||||
</CustomAlertModal>
|
</Modal>
|
||||||
|
|
||||||
<div className="flex flex-col gap-6">
|
<div className="flex flex-col gap-6">
|
||||||
{/* Header with Add Button */}
|
{/* Header with Add Button */}
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ import {
|
|||||||
IntegrationSkeleton,
|
IntegrationSkeleton,
|
||||||
} from "@/components/integrations/shared";
|
} from "@/components/integrations/shared";
|
||||||
import { Button } from "@/components/shadcn";
|
import { Button } from "@/components/shadcn";
|
||||||
|
import { Modal } from "@/components/shadcn/modal";
|
||||||
import { useToast } from "@/components/ui";
|
import { useToast } from "@/components/ui";
|
||||||
import { CustomAlertModal } from "@/components/ui/custom";
|
|
||||||
import { DataTablePagination } from "@/components/ui/table/data-table-pagination";
|
import { DataTablePagination } from "@/components/ui/table/data-table-pagination";
|
||||||
import { triggerTestConnectionWithDelay } from "@/lib/integrations/test-connection-helper";
|
import { triggerTestConnectionWithDelay } from "@/lib/integrations/test-connection-helper";
|
||||||
import { MetaDataProps } from "@/types";
|
import { MetaDataProps } from "@/types";
|
||||||
@@ -209,8 +209,8 @@ export const S3IntegrationsManager = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<CustomAlertModal
|
<Modal
|
||||||
isOpen={isDeleteOpen}
|
open={isDeleteOpen}
|
||||||
onOpenChange={setIsDeleteOpen}
|
onOpenChange={setIsDeleteOpen}
|
||||||
title="Delete S3 Integration"
|
title="Delete S3 Integration"
|
||||||
description="This action cannot be undone. This will permanently delete your S3 integration."
|
description="This action cannot be undone. This will permanently delete your S3 integration."
|
||||||
@@ -243,10 +243,10 @@ export const S3IntegrationsManager = ({
|
|||||||
{isDeleting ? "Deleting..." : "Delete"}
|
{isDeleting ? "Deleting..." : "Delete"}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</CustomAlertModal>
|
</Modal>
|
||||||
|
|
||||||
<CustomAlertModal
|
<Modal
|
||||||
isOpen={isModalOpen}
|
open={isModalOpen}
|
||||||
onOpenChange={setIsModalOpen}
|
onOpenChange={setIsModalOpen}
|
||||||
title={
|
title={
|
||||||
editMode === "configuration"
|
editMode === "configuration"
|
||||||
@@ -265,7 +265,7 @@ export const S3IntegrationsManager = ({
|
|||||||
onCancel={handleModalClose}
|
onCancel={handleModalClose}
|
||||||
editMode={editMode}
|
editMode={editMode}
|
||||||
/>
|
/>
|
||||||
</CustomAlertModal>
|
</Modal>
|
||||||
|
|
||||||
<div className="flex flex-col gap-6">
|
<div className="flex flex-col gap-6">
|
||||||
{/* Header with Add Button */}
|
{/* Header with Add Button */}
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import { useState } from "react";
|
|||||||
|
|
||||||
import { deleteSamlConfig } from "@/actions/integrations";
|
import { deleteSamlConfig } from "@/actions/integrations";
|
||||||
import { Button } from "@/components/shadcn";
|
import { Button } from "@/components/shadcn";
|
||||||
|
import { Modal } from "@/components/shadcn/modal";
|
||||||
import { useToast } from "@/components/ui";
|
import { useToast } from "@/components/ui";
|
||||||
import { CustomAlertModal } from "@/components/ui/custom";
|
|
||||||
import { CustomLink } from "@/components/ui/custom/custom-link";
|
import { CustomLink } from "@/components/ui/custom/custom-link";
|
||||||
|
|
||||||
import { Card, CardContent, CardHeader } from "../../shadcn";
|
import { Card, CardContent, CardHeader } from "../../shadcn";
|
||||||
@@ -53,8 +53,8 @@ export const SamlIntegrationCard = ({ samlConfig }: { samlConfig?: any }) => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{/* Configure SAML Modal */}
|
{/* Configure SAML Modal */}
|
||||||
<CustomAlertModal
|
<Modal
|
||||||
isOpen={isSamlModalOpen}
|
open={isSamlModalOpen}
|
||||||
onOpenChange={setIsSamlModalOpen}
|
onOpenChange={setIsSamlModalOpen}
|
||||||
title="Configure SAML SSO"
|
title="Configure SAML SSO"
|
||||||
>
|
>
|
||||||
@@ -62,11 +62,11 @@ export const SamlIntegrationCard = ({ samlConfig }: { samlConfig?: any }) => {
|
|||||||
setIsOpen={setIsSamlModalOpen}
|
setIsOpen={setIsSamlModalOpen}
|
||||||
samlConfig={samlConfig}
|
samlConfig={samlConfig}
|
||||||
/>
|
/>
|
||||||
</CustomAlertModal>
|
</Modal>
|
||||||
|
|
||||||
{/* Delete Confirmation Modal */}
|
{/* Delete Confirmation Modal */}
|
||||||
<CustomAlertModal
|
<Modal
|
||||||
isOpen={isDeleteModalOpen}
|
open={isDeleteModalOpen}
|
||||||
onOpenChange={setIsDeleteModalOpen}
|
onOpenChange={setIsDeleteModalOpen}
|
||||||
title="Remove SAML Configuration"
|
title="Remove SAML Configuration"
|
||||||
size="md"
|
size="md"
|
||||||
@@ -98,7 +98,7 @@ export const SamlIntegrationCard = ({ samlConfig }: { samlConfig?: any }) => {
|
|||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</CustomAlertModal>
|
</Modal>
|
||||||
|
|
||||||
<Card variant="base" padding="lg">
|
<Card variant="base" padding="lg">
|
||||||
<CardHeader>
|
<CardHeader>
|
||||||
|
|||||||
@@ -17,8 +17,8 @@ import {
|
|||||||
IntegrationSkeleton,
|
IntegrationSkeleton,
|
||||||
} from "@/components/integrations/shared";
|
} from "@/components/integrations/shared";
|
||||||
import { Button } from "@/components/shadcn";
|
import { Button } from "@/components/shadcn";
|
||||||
|
import { Modal } from "@/components/shadcn/modal";
|
||||||
import { useToast } from "@/components/ui";
|
import { useToast } from "@/components/ui";
|
||||||
import { CustomAlertModal } from "@/components/ui/custom";
|
|
||||||
import { DataTablePagination } from "@/components/ui/table/data-table-pagination";
|
import { DataTablePagination } from "@/components/ui/table/data-table-pagination";
|
||||||
import { triggerTestConnectionWithDelay } from "@/lib/integrations/test-connection-helper";
|
import { triggerTestConnectionWithDelay } from "@/lib/integrations/test-connection-helper";
|
||||||
import { MetaDataProps } from "@/types";
|
import { MetaDataProps } from "@/types";
|
||||||
@@ -259,8 +259,8 @@ export const SecurityHubIntegrationsManager = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<CustomAlertModal
|
<Modal
|
||||||
isOpen={isDeleteOpen}
|
open={isDeleteOpen}
|
||||||
onOpenChange={setIsDeleteOpen}
|
onOpenChange={setIsDeleteOpen}
|
||||||
title="Delete Security Hub Integration"
|
title="Delete Security Hub Integration"
|
||||||
description="This action cannot be undone. This will permanently delete your Security Hub integration."
|
description="This action cannot be undone. This will permanently delete your Security Hub integration."
|
||||||
@@ -293,10 +293,10 @@ export const SecurityHubIntegrationsManager = ({
|
|||||||
{isDeleting ? "Deleting..." : "Delete"}
|
{isDeleting ? "Deleting..." : "Delete"}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</CustomAlertModal>
|
</Modal>
|
||||||
|
|
||||||
<CustomAlertModal
|
<Modal
|
||||||
isOpen={isModalOpen}
|
open={isModalOpen}
|
||||||
onOpenChange={setIsModalOpen}
|
onOpenChange={setIsModalOpen}
|
||||||
title={
|
title={
|
||||||
editMode === "configuration"
|
editMode === "configuration"
|
||||||
@@ -316,7 +316,7 @@ export const SecurityHubIntegrationsManager = ({
|
|||||||
onCancel={handleModalClose}
|
onCancel={handleModalClose}
|
||||||
editMode={editMode}
|
editMode={editMode}
|
||||||
/>
|
/>
|
||||||
</CustomAlertModal>
|
</Modal>
|
||||||
|
|
||||||
<div className="flex flex-col gap-6">
|
<div className="flex flex-col gap-6">
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import { useState } from "react";
|
|||||||
|
|
||||||
import { VerticalDotsIcon } from "@/components/icons";
|
import { VerticalDotsIcon } from "@/components/icons";
|
||||||
import { Button } from "@/components/shadcn";
|
import { Button } from "@/components/shadcn";
|
||||||
import { CustomAlertModal } from "@/components/ui/custom";
|
import { Modal } from "@/components/shadcn/modal";
|
||||||
|
|
||||||
import { DeleteForm, EditForm } from "../forms";
|
import { DeleteForm, EditForm } from "../forms";
|
||||||
|
|
||||||
@@ -44,8 +44,8 @@ export function DataTableRowActions<InvitationProps>({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<CustomAlertModal
|
<Modal
|
||||||
isOpen={isEditOpen}
|
open={isEditOpen}
|
||||||
onOpenChange={setIsEditOpen}
|
onOpenChange={setIsEditOpen}
|
||||||
title="Edit invitation details"
|
title="Edit invitation details"
|
||||||
>
|
>
|
||||||
@@ -56,15 +56,15 @@ export function DataTableRowActions<InvitationProps>({
|
|||||||
roles={roles || []}
|
roles={roles || []}
|
||||||
setIsOpen={setIsEditOpen}
|
setIsOpen={setIsEditOpen}
|
||||||
/>
|
/>
|
||||||
</CustomAlertModal>
|
</Modal>
|
||||||
<CustomAlertModal
|
<Modal
|
||||||
isOpen={isDeleteOpen}
|
open={isDeleteOpen}
|
||||||
onOpenChange={setIsDeleteOpen}
|
onOpenChange={setIsDeleteOpen}
|
||||||
title="Are you absolutely sure?"
|
title="Are you absolutely sure?"
|
||||||
description="This action cannot be undone. This will permanently revoke your invitation."
|
description="This action cannot be undone. This will permanently revoke your invitation."
|
||||||
>
|
>
|
||||||
<DeleteForm invitationId={invitationId} setIsOpen={setIsDeleteOpen} />
|
<DeleteForm invitationId={invitationId} setIsOpen={setIsDeleteOpen} />
|
||||||
</CustomAlertModal>
|
</Modal>
|
||||||
|
|
||||||
<div className="relative flex items-center justify-end gap-2">
|
<div className="relative flex items-center justify-end gap-2">
|
||||||
<Dropdown
|
<Dropdown
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import { useState } from "react";
|
|||||||
|
|
||||||
import { VerticalDotsIcon } from "@/components/icons";
|
import { VerticalDotsIcon } from "@/components/icons";
|
||||||
import { Button } from "@/components/shadcn";
|
import { Button } from "@/components/shadcn";
|
||||||
import { CustomAlertModal } from "@/components/ui/custom";
|
import { Modal } from "@/components/shadcn/modal";
|
||||||
|
|
||||||
import { DeleteGroupForm } from "../forms";
|
import { DeleteGroupForm } from "../forms";
|
||||||
|
|
||||||
@@ -37,14 +37,14 @@ export function DataTableRowActions<ProviderProps>({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<CustomAlertModal
|
<Modal
|
||||||
isOpen={isDeleteOpen}
|
open={isDeleteOpen}
|
||||||
onOpenChange={setIsDeleteOpen}
|
onOpenChange={setIsDeleteOpen}
|
||||||
title="Are you absolutely sure?"
|
title="Are you absolutely sure?"
|
||||||
description="This action cannot be undone. This will permanently delete your provider account and remove your data from the server."
|
description="This action cannot be undone. This will permanently delete your provider account and remove your data from the server."
|
||||||
>
|
>
|
||||||
<DeleteGroupForm groupId={groupId} setIsOpen={setIsDeleteOpen} />
|
<DeleteGroupForm groupId={groupId} setIsOpen={setIsDeleteOpen} />
|
||||||
</CustomAlertModal>
|
</Modal>
|
||||||
|
|
||||||
<div className="relative flex items-center justify-end gap-2">
|
<div className="relative flex items-center justify-end gap-2">
|
||||||
<Dropdown
|
<Dropdown
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import { useState } from "react";
|
|||||||
import { checkConnectionProvider } from "@/actions/providers/providers";
|
import { checkConnectionProvider } from "@/actions/providers/providers";
|
||||||
import { VerticalDotsIcon } from "@/components/icons";
|
import { VerticalDotsIcon } from "@/components/icons";
|
||||||
import { Button } from "@/components/shadcn";
|
import { Button } from "@/components/shadcn";
|
||||||
import { CustomAlertModal } from "@/components/ui/custom";
|
import { Modal } from "@/components/shadcn/modal";
|
||||||
|
|
||||||
import { EditForm } from "../forms";
|
import { EditForm } from "../forms";
|
||||||
import { DeleteForm } from "../forms/delete-form";
|
import { DeleteForm } from "../forms/delete-form";
|
||||||
@@ -61,8 +61,8 @@ export function DataTableRowActions<ProviderProps>({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<CustomAlertModal
|
<Modal
|
||||||
isOpen={isEditOpen}
|
open={isEditOpen}
|
||||||
onOpenChange={setIsEditOpen}
|
onOpenChange={setIsEditOpen}
|
||||||
title="Edit Provider Alias"
|
title="Edit Provider Alias"
|
||||||
>
|
>
|
||||||
@@ -71,15 +71,15 @@ export function DataTableRowActions<ProviderProps>({
|
|||||||
providerAlias={providerAlias}
|
providerAlias={providerAlias}
|
||||||
setIsOpen={setIsEditOpen}
|
setIsOpen={setIsEditOpen}
|
||||||
/>
|
/>
|
||||||
</CustomAlertModal>
|
</Modal>
|
||||||
<CustomAlertModal
|
<Modal
|
||||||
isOpen={isDeleteOpen}
|
open={isDeleteOpen}
|
||||||
onOpenChange={setIsDeleteOpen}
|
onOpenChange={setIsDeleteOpen}
|
||||||
title="Are you absolutely sure?"
|
title="Are you absolutely sure?"
|
||||||
description="This action cannot be undone. This will permanently delete your provider account and remove your data from the server."
|
description="This action cannot be undone. This will permanently delete your provider account and remove your data from the server."
|
||||||
>
|
>
|
||||||
<DeleteForm providerId={providerId} setIsOpen={setIsDeleteOpen} />
|
<DeleteForm providerId={providerId} setIsOpen={setIsDeleteOpen} />
|
||||||
</CustomAlertModal>
|
</Modal>
|
||||||
|
|
||||||
<div className="relative flex items-center justify-end gap-2">
|
<div className="relative flex items-center justify-end gap-2">
|
||||||
<Dropdown
|
<Dropdown
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import { useState } from "react";
|
|||||||
|
|
||||||
import { VerticalDotsIcon } from "@/components/icons";
|
import { VerticalDotsIcon } from "@/components/icons";
|
||||||
import { Button } from "@/components/shadcn";
|
import { Button } from "@/components/shadcn";
|
||||||
import { CustomAlertModal } from "@/components/ui/custom/custom-alert-modal";
|
import { Modal } from "@/components/shadcn/modal";
|
||||||
|
|
||||||
import { DeleteRoleForm } from "../workflow/forms";
|
import { DeleteRoleForm } from "../workflow/forms";
|
||||||
interface DataTableRowActionsProps<RoleProps> {
|
interface DataTableRowActionsProps<RoleProps> {
|
||||||
@@ -34,14 +34,14 @@ export function DataTableRowActions<RoleProps>({
|
|||||||
const roleId = (row.original as { id: string }).id;
|
const roleId = (row.original as { id: string }).id;
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<CustomAlertModal
|
<Modal
|
||||||
isOpen={isDeleteOpen}
|
open={isDeleteOpen}
|
||||||
onOpenChange={setIsDeleteOpen}
|
onOpenChange={setIsDeleteOpen}
|
||||||
title="Are you absolutely sure?"
|
title="Are you absolutely sure?"
|
||||||
description="This action cannot be undone. This will permanently delete your role and remove your data from the server."
|
description="This action cannot be undone. This will permanently delete your role and remove your data from the server."
|
||||||
>
|
>
|
||||||
<DeleteRoleForm roleId={roleId} setIsOpen={setIsDeleteOpen} />
|
<DeleteRoleForm roleId={roleId} setIsOpen={setIsDeleteOpen} />
|
||||||
</CustomAlertModal>
|
</Modal>
|
||||||
<div className="relative flex items-center justify-end gap-2">
|
<div className="relative flex items-center justify-end gap-2">
|
||||||
<Dropdown
|
<Dropdown
|
||||||
className="border-border-neutral-secondary bg-bg-neutral-secondary border shadow-xl"
|
className="border-border-neutral-secondary bg-bg-neutral-secondary border shadow-xl"
|
||||||
|
|||||||
@@ -17,8 +17,8 @@ import { useState } from "react";
|
|||||||
|
|
||||||
import { VerticalDotsIcon } from "@/components/icons";
|
import { VerticalDotsIcon } from "@/components/icons";
|
||||||
import { Button } from "@/components/shadcn";
|
import { Button } from "@/components/shadcn";
|
||||||
|
import { Modal } from "@/components/shadcn/modal";
|
||||||
import { useToast } from "@/components/ui";
|
import { useToast } from "@/components/ui";
|
||||||
import { CustomAlertModal } from "@/components/ui/custom";
|
|
||||||
import { downloadScanZip } from "@/lib/helper";
|
import { downloadScanZip } from "@/lib/helper";
|
||||||
|
|
||||||
import { EditScanForm } from "../../forms";
|
import { EditScanForm } from "../../forms";
|
||||||
@@ -39,8 +39,8 @@ export function DataTableRowActions<ScanProps>({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<CustomAlertModal
|
<Modal
|
||||||
isOpen={isEditOpen}
|
open={isEditOpen}
|
||||||
onOpenChange={setIsEditOpen}
|
onOpenChange={setIsEditOpen}
|
||||||
title="Edit Scan Name"
|
title="Edit Scan Name"
|
||||||
>
|
>
|
||||||
@@ -49,7 +49,7 @@ export function DataTableRowActions<ScanProps>({
|
|||||||
scanName={scanName}
|
scanName={scanName}
|
||||||
setIsOpen={setIsEditOpen}
|
setIsOpen={setIsEditOpen}
|
||||||
/>
|
/>
|
||||||
</CustomAlertModal>
|
</Modal>
|
||||||
|
|
||||||
<div className="relative flex items-center justify-end gap-2">
|
<div className="relative flex items-center justify-end gap-2">
|
||||||
<Dropdown
|
<Dropdown
|
||||||
|
|||||||
@@ -1,62 +0,0 @@
|
|||||||
import { ReactNode } from "react";
|
|
||||||
|
|
||||||
import {
|
|
||||||
Dialog,
|
|
||||||
DialogContent,
|
|
||||||
DialogDescription,
|
|
||||||
DialogHeader,
|
|
||||||
DialogTitle,
|
|
||||||
} from "@/components/shadcn/dialog";
|
|
||||||
import { cn } from "@/lib/utils";
|
|
||||||
|
|
||||||
interface CustomAlertModalProps {
|
|
||||||
isOpen: boolean;
|
|
||||||
onOpenChange: (isOpen: boolean) => void;
|
|
||||||
title?: string;
|
|
||||||
description?: string;
|
|
||||||
children: ReactNode;
|
|
||||||
size?: "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl";
|
|
||||||
}
|
|
||||||
|
|
||||||
const sizeClasses = {
|
|
||||||
sm: "sm:max-w-sm",
|
|
||||||
md: "sm:max-w-md",
|
|
||||||
lg: "sm:max-w-lg",
|
|
||||||
xl: "sm:max-w-xl",
|
|
||||||
"2xl": "sm:max-w-2xl",
|
|
||||||
"3xl": "sm:max-w-3xl",
|
|
||||||
"4xl": "sm:max-w-4xl",
|
|
||||||
"5xl": "sm:max-w-5xl",
|
|
||||||
} as const;
|
|
||||||
|
|
||||||
export const CustomAlertModal = ({
|
|
||||||
isOpen,
|
|
||||||
onOpenChange,
|
|
||||||
title,
|
|
||||||
description,
|
|
||||||
children,
|
|
||||||
size = "xl",
|
|
||||||
}: CustomAlertModalProps) => {
|
|
||||||
return (
|
|
||||||
<Dialog open={isOpen} onOpenChange={onOpenChange}>
|
|
||||||
<DialogContent
|
|
||||||
className={cn(
|
|
||||||
"border-border-neutral-secondary bg-bg-neutral-secondary",
|
|
||||||
sizeClasses[size],
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
{title && (
|
|
||||||
<DialogHeader>
|
|
||||||
<DialogTitle>{title}</DialogTitle>
|
|
||||||
{description && (
|
|
||||||
<DialogDescription className="text-small text-gray-600 dark:text-gray-300">
|
|
||||||
{description}
|
|
||||||
</DialogDescription>
|
|
||||||
)}
|
|
||||||
</DialogHeader>
|
|
||||||
)}
|
|
||||||
{children}
|
|
||||||
</DialogContent>
|
|
||||||
</Dialog>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
export * from "./custom-alert-modal";
|
|
||||||
export * from "./custom-banner";
|
export * from "./custom-banner";
|
||||||
export * from "./custom-dropdown-selection";
|
export * from "./custom-dropdown-selection";
|
||||||
export * from "./custom-input";
|
export * from "./custom-input";
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
import { Snippet } from "@heroui/snippet";
|
import { Snippet } from "@heroui/snippet";
|
||||||
|
|
||||||
import { Button } from "@/components/shadcn";
|
import { Button } from "@/components/shadcn";
|
||||||
|
import { Modal } from "@/components/shadcn/modal";
|
||||||
import { Alert, AlertDescription } from "@/components/ui/alert/Alert";
|
import { Alert, AlertDescription } from "@/components/ui/alert/Alert";
|
||||||
import { CustomAlertModal } from "@/components/ui/custom/custom-alert-modal";
|
|
||||||
|
|
||||||
interface ApiKeySuccessModalProps {
|
interface ApiKeySuccessModalProps {
|
||||||
isOpen: boolean;
|
isOpen: boolean;
|
||||||
@@ -18,8 +18,8 @@ export const ApiKeySuccessModal = ({
|
|||||||
apiKey,
|
apiKey,
|
||||||
}: ApiKeySuccessModalProps) => {
|
}: ApiKeySuccessModalProps) => {
|
||||||
return (
|
return (
|
||||||
<CustomAlertModal
|
<Modal
|
||||||
isOpen={isOpen}
|
open={isOpen}
|
||||||
onOpenChange={(open) => !open && onClose()}
|
onOpenChange={(open) => !open && onClose()}
|
||||||
title="API Key Created Successfully"
|
title="API Key Created Successfully"
|
||||||
>
|
>
|
||||||
@@ -56,6 +56,6 @@ export const ApiKeySuccessModal = ({
|
|||||||
Acknowledged
|
Acknowledged
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</CustomAlertModal>
|
</Modal>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ import { useForm } from "react-hook-form";
|
|||||||
import * as z from "zod";
|
import * as z from "zod";
|
||||||
|
|
||||||
import { createApiKey } from "@/actions/api-keys/api-keys";
|
import { createApiKey } from "@/actions/api-keys/api-keys";
|
||||||
|
import { Modal } from "@/components/shadcn/modal";
|
||||||
import { useToast } from "@/components/ui";
|
import { useToast } from "@/components/ui";
|
||||||
import { CustomInput } from "@/components/ui/custom";
|
import { CustomInput } from "@/components/ui/custom";
|
||||||
import { CustomAlertModal } from "@/components/ui/custom/custom-alert-modal";
|
|
||||||
import { CustomLink } from "@/components/ui/custom/custom-link";
|
import { CustomLink } from "@/components/ui/custom/custom-link";
|
||||||
import { Form, FormButtons } from "@/components/ui/form";
|
import { Form, FormButtons } from "@/components/ui/form";
|
||||||
|
|
||||||
@@ -86,8 +86,8 @@ export const CreateApiKeyModal = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<CustomAlertModal
|
<Modal
|
||||||
isOpen={isOpen}
|
open={isOpen}
|
||||||
onOpenChange={(open) => !open && handleClose()}
|
onOpenChange={(open) => !open && handleClose()}
|
||||||
title="Create API Key"
|
title="Create API Key"
|
||||||
size="lg"
|
size="lg"
|
||||||
@@ -139,6 +139,6 @@ export const CreateApiKeyModal = ({
|
|||||||
/>
|
/>
|
||||||
</form>
|
</form>
|
||||||
</Form>
|
</Form>
|
||||||
</CustomAlertModal>
|
</Modal>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import { useForm } from "react-hook-form";
|
|||||||
import * as z from "zod";
|
import * as z from "zod";
|
||||||
|
|
||||||
import { updateApiKey } from "@/actions/api-keys/api-keys";
|
import { updateApiKey } from "@/actions/api-keys/api-keys";
|
||||||
|
import { Modal } from "@/components/shadcn/modal";
|
||||||
import { useToast } from "@/components/ui";
|
import { useToast } from "@/components/ui";
|
||||||
import { CustomInput } from "@/components/ui/custom";
|
import { CustomInput } from "@/components/ui/custom";
|
||||||
import { CustomAlertModal } from "@/components/ui/custom/custom-alert-modal";
|
|
||||||
import { Form, FormButtons } from "@/components/ui/form";
|
import { Form, FormButtons } from "@/components/ui/form";
|
||||||
|
|
||||||
import { EnrichedApiKey } from "./api-keys/types";
|
import { EnrichedApiKey } from "./api-keys/types";
|
||||||
@@ -92,8 +92,8 @@ export const EditApiKeyNameModal = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<CustomAlertModal
|
<Modal
|
||||||
isOpen={isOpen}
|
open={isOpen}
|
||||||
onOpenChange={(open) => !open && handleClose()}
|
onOpenChange={(open) => !open && handleClose()}
|
||||||
title="Edit API Key Name"
|
title="Edit API Key Name"
|
||||||
size="lg"
|
size="lg"
|
||||||
@@ -129,6 +129,6 @@ export const EditApiKeyNameModal = ({
|
|||||||
/>
|
/>
|
||||||
</form>
|
</form>
|
||||||
</Form>
|
</Form>
|
||||||
</CustomAlertModal>
|
</Modal>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { Chip } from "@heroui/chip";
|
|||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
|
||||||
import { Button, Card } from "@/components/shadcn";
|
import { Button, Card } from "@/components/shadcn";
|
||||||
import { CustomAlertModal } from "@/components/ui/custom";
|
import { Modal } from "@/components/shadcn/modal";
|
||||||
import { DateWithTime, InfoField } from "@/components/ui/entities";
|
import { DateWithTime, InfoField } from "@/components/ui/entities";
|
||||||
import { MembershipDetailData } from "@/types/users";
|
import { MembershipDetailData } from "@/types/users";
|
||||||
|
|
||||||
@@ -25,17 +25,13 @@ export const MembershipItem = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<CustomAlertModal
|
<Modal open={isEditOpen} onOpenChange={setIsEditOpen} title="">
|
||||||
isOpen={isEditOpen}
|
|
||||||
onOpenChange={setIsEditOpen}
|
|
||||||
title=""
|
|
||||||
>
|
|
||||||
<EditTenantForm
|
<EditTenantForm
|
||||||
tenantId={tenantId}
|
tenantId={tenantId}
|
||||||
tenantName={tenantName}
|
tenantName={tenantName}
|
||||||
setIsOpen={setIsEditOpen}
|
setIsOpen={setIsEditOpen}
|
||||||
/>
|
/>
|
||||||
</CustomAlertModal>
|
</Modal>
|
||||||
<Card variant="inner" className="min-w-[320px] p-2">
|
<Card variant="inner" className="min-w-[320px] p-2">
|
||||||
<div className="flex w-full items-center gap-4">
|
<div className="flex w-full items-center gap-4">
|
||||||
<Chip size="sm" variant="flat" color="secondary">
|
<Chip size="sm" variant="flat" color="secondary">
|
||||||
|
|||||||
@@ -4,12 +4,12 @@ import { Snippet } from "@heroui/snippet";
|
|||||||
import { Trash2Icon } from "lucide-react";
|
import { Trash2Icon } from "lucide-react";
|
||||||
|
|
||||||
import { revokeApiKey } from "@/actions/api-keys/api-keys";
|
import { revokeApiKey } from "@/actions/api-keys/api-keys";
|
||||||
|
import { Modal } from "@/components/shadcn/modal";
|
||||||
import {
|
import {
|
||||||
Alert,
|
Alert,
|
||||||
AlertDescription,
|
AlertDescription,
|
||||||
AlertTitle,
|
AlertTitle,
|
||||||
} from "@/components/ui/alert/Alert";
|
} from "@/components/ui/alert/Alert";
|
||||||
import { CustomAlertModal } from "@/components/ui/custom/custom-alert-modal";
|
|
||||||
import { ModalButtons } from "@/components/ui/custom/custom-modal-buttons";
|
import { ModalButtons } from "@/components/ui/custom/custom-modal-buttons";
|
||||||
|
|
||||||
import { FALLBACK_VALUES } from "./api-keys/constants";
|
import { FALLBACK_VALUES } from "./api-keys/constants";
|
||||||
@@ -49,8 +49,8 @@ export const RevokeApiKeyModal = ({
|
|||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<CustomAlertModal
|
<Modal
|
||||||
isOpen={isOpen}
|
open={isOpen}
|
||||||
onOpenChange={(open) => !open && handleClose()}
|
onOpenChange={(open) => !open && handleClose()}
|
||||||
title="Revoke API Key"
|
title="Revoke API Key"
|
||||||
size="lg"
|
size="lg"
|
||||||
@@ -95,6 +95,6 @@ export const RevokeApiKeyModal = ({
|
|||||||
submitColor="danger"
|
submitColor="danger"
|
||||||
submitIcon={<Trash2Icon size={24} />}
|
submitIcon={<Trash2Icon size={24} />}
|
||||||
/>
|
/>
|
||||||
</CustomAlertModal>
|
</Modal>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import { useState } from "react";
|
|||||||
|
|
||||||
import { VerticalDotsIcon } from "@/components/icons";
|
import { VerticalDotsIcon } from "@/components/icons";
|
||||||
import { Button } from "@/components/shadcn";
|
import { Button } from "@/components/shadcn";
|
||||||
import { CustomAlertModal } from "@/components/ui/custom";
|
import { Modal } from "@/components/shadcn/modal";
|
||||||
|
|
||||||
import { DeleteForm, EditForm } from "../forms";
|
import { DeleteForm, EditForm } from "../forms";
|
||||||
|
|
||||||
@@ -41,8 +41,8 @@ export function DataTableRowActions<UserProps>({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<CustomAlertModal
|
<Modal
|
||||||
isOpen={isEditOpen}
|
open={isEditOpen}
|
||||||
onOpenChange={setIsEditOpen}
|
onOpenChange={setIsEditOpen}
|
||||||
title="Edit user details"
|
title="Edit user details"
|
||||||
>
|
>
|
||||||
@@ -55,15 +55,15 @@ export function DataTableRowActions<UserProps>({
|
|||||||
roles={roles || []}
|
roles={roles || []}
|
||||||
setIsOpen={setIsEditOpen}
|
setIsOpen={setIsEditOpen}
|
||||||
/>
|
/>
|
||||||
</CustomAlertModal>
|
</Modal>
|
||||||
<CustomAlertModal
|
<Modal
|
||||||
isOpen={isDeleteOpen}
|
open={isDeleteOpen}
|
||||||
onOpenChange={setIsDeleteOpen}
|
onOpenChange={setIsDeleteOpen}
|
||||||
title="Are you absolutely sure?"
|
title="Are you absolutely sure?"
|
||||||
description="This action cannot be undone. This will permanently delete your user account and remove your data from the server."
|
description="This action cannot be undone. This will permanently delete your user account and remove your data from the server."
|
||||||
>
|
>
|
||||||
<DeleteForm userId={userId} setIsOpen={setIsDeleteOpen} />
|
<DeleteForm userId={userId} setIsOpen={setIsDeleteOpen} />
|
||||||
</CustomAlertModal>
|
</Modal>
|
||||||
|
|
||||||
<div className="relative flex items-center justify-end gap-2">
|
<div className="relative flex items-center justify-end gap-2">
|
||||||
<Dropdown
|
<Dropdown
|
||||||
|
|||||||
Reference in New Issue
Block a user