fix: code splitting for workspace delete modal (#6581)
* fix: code splitting for delete modal * fix: redirected to profile post deletion * fix: translations
This commit is contained in:
parent
cc9b448a9b
commit
6a3ccafe35
11 changed files with 264 additions and 221 deletions
27
web/ce/components/workspace/delete-workspace-modal.tsx
Normal file
27
web/ce/components/workspace/delete-workspace-modal.tsx
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
"use client";
|
||||
|
||||
import React from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import type { IWorkspace } from "@plane/types";
|
||||
// ui
|
||||
import { EModalPosition, EModalWidth, ModalCore } from "@plane/ui";
|
||||
// constants
|
||||
// hooks
|
||||
|
||||
import { DeleteWorkspaceForm } from "@/components/workspace/delete-workspace-form";
|
||||
|
||||
type Props = {
|
||||
isOpen: boolean;
|
||||
data: IWorkspace | null;
|
||||
onClose: () => void;
|
||||
};
|
||||
|
||||
export const DeleteWorkspaceModal: React.FC<Props> = observer((props) => {
|
||||
const { isOpen, data, onClose } = props;
|
||||
|
||||
return (
|
||||
<ModalCore isOpen={isOpen} handleClose={() => onClose()} position={EModalPosition.CENTER} width={EModalWidth.XL}>
|
||||
<DeleteWorkspaceForm data={data} onClose={onClose} />
|
||||
</ModalCore>
|
||||
);
|
||||
});
|
||||
|
|
@ -6,8 +6,8 @@ import { useTranslation } from "@plane/i18n";
|
|||
import { IWorkspace } from "@plane/types";
|
||||
// ui
|
||||
import { Button, Collapsible } from "@plane/ui";
|
||||
import { DeleteWorkspaceModal } from "./delete-workspace-modal";
|
||||
// components
|
||||
import { DeleteWorkspaceModal } from "@/components/workspace";
|
||||
|
||||
type TDeleteWorkspace = {
|
||||
workspace: IWorkspace | null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue