diff --git a/apps/console/src/pages/organizations/frameworks/FrameworkListView.tsx b/apps/console/src/pages/organizations/frameworks/FrameworkListView.tsx index bb463193f..d53b9f8e7 100644 --- a/apps/console/src/pages/organizations/frameworks/FrameworkListView.tsx +++ b/apps/console/src/pages/organizations/frameworks/FrameworkListView.tsx @@ -13,14 +13,6 @@ import type { FrameworkListViewQuery as FrameworkListViewQueryType } from "./__g import { Button } from "@/components/ui/button"; import { Plus, Upload } from "lucide-react"; import { useToast } from "@/hooks/use-toast"; -import { - Dialog, - DialogContent, - DialogHeader, - DialogTitle, - DialogTrigger, -} from "@/components/ui/dialog"; -import { Label } from "@/components/ui/label"; import { Input } from "@/components/ui/input"; import { FrameworkListViewImportFrameworkMutation as FrameworkListViewImportFrameworkMutationType } from "./__generated__/FrameworkListViewImportFrameworkMutation.graphql"; import { PageTemplate } from "@/components/PageTemplate"; @@ -77,11 +69,16 @@ function FrameworkListViewContent({ useMutation( FrameworkListViewImportFrameworkMutation ); - const [isImportDialogOpen, setIsImportDialogOpen] = useState(false); const [isUploading, setIsUploading] = useState(false); const fileInputRef = useRef(null); const { toast } = useToast(); + const handleImportClick = () => { + if (fileInputRef.current) { + fileInputRef.current.click(); + } + }; + const handleFileChange = (e: React.ChangeEvent) => { const file = e.target.files?.[0]; if (!file) return; @@ -106,7 +103,6 @@ function FrameworkListViewContent({ }, onCompleted: () => { setIsUploading(false); - setIsImportDialogOpen(false); toast({ title: "Framework imported", description: "Framework has been imported successfully.", @@ -133,38 +129,23 @@ function FrameworkListViewContent({ description="Manage your compliance frameworks" actions={
- + - - - - Import Framework - -
-
- - -

- Upload a JSON file containing your framework definition. -

-
-
-
-
+ + Import Framework +