[WEB-5095]chore: updated delete modal info content (#7967)
* chore: updated delete modal info content * chore: added language support for modal content --------- Co-authored-by: sriramveeraghanta <veeraghanta.sriram@gmail.com>
This commit is contained in:
parent
44a483f895
commit
ee176efae3
22 changed files with 195 additions and 19 deletions
|
|
@ -5,6 +5,7 @@ import { observer } from "mobx-react";
|
|||
import { useParams, useRouter } from "next/navigation";
|
||||
// types
|
||||
import { PROJECT_VIEW_TRACKER_EVENTS } from "@plane/constants";
|
||||
import { useTranslation } from "@plane/i18n";
|
||||
import { TOAST_TYPE, setToast } from "@plane/propel/toast";
|
||||
import type { IProjectView } from "@plane/types";
|
||||
// ui
|
||||
|
|
@ -29,7 +30,7 @@ export const DeleteProjectViewModal: React.FC<Props> = observer((props) => {
|
|||
const router = useRouter();
|
||||
// store hooks
|
||||
const { deleteView } = useProjectView();
|
||||
|
||||
const { t } = useTranslation();
|
||||
const handleClose = () => {
|
||||
onClose();
|
||||
setIsDeleteLoading(false);
|
||||
|
|
@ -80,14 +81,8 @@ export const DeleteProjectViewModal: React.FC<Props> = observer((props) => {
|
|||
handleSubmit={handleDeleteView}
|
||||
isSubmitting={isDeleteLoading}
|
||||
isOpen={isOpen}
|
||||
title="Delete view"
|
||||
content={
|
||||
<>
|
||||
Are you sure you want to delete view-{" "}
|
||||
<span className="break-all font-medium text-custom-text-100">{data?.name}</span>? All of the data related to
|
||||
the view will be permanently removed. This action cannot be undone.
|
||||
</>
|
||||
}
|
||||
title={t("project_views.delete_view.title")}
|
||||
content={<>{t("project_views.delete_view.content")}</>}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import { observer } from "mobx-react";
|
|||
import { useParams } from "next/navigation";
|
||||
// types
|
||||
import { GLOBAL_VIEW_TRACKER_EVENTS } from "@plane/constants";
|
||||
import { useTranslation } from "@plane/i18n";
|
||||
import { TOAST_TYPE, setToast } from "@plane/propel/toast";
|
||||
import type { IWorkspaceView } from "@plane/types";
|
||||
// ui
|
||||
|
|
@ -28,7 +29,7 @@ export const DeleteGlobalViewModal: React.FC<Props> = observer((props) => {
|
|||
const { workspaceSlug } = useParams();
|
||||
// store hooks
|
||||
const { deleteGlobalView } = useGlobalView();
|
||||
|
||||
const { t } = useTranslation();
|
||||
const handleClose = () => onClose();
|
||||
|
||||
const handleDeletion = async () => {
|
||||
|
|
@ -74,14 +75,8 @@ export const DeleteGlobalViewModal: React.FC<Props> = observer((props) => {
|
|||
handleSubmit={handleDeletion}
|
||||
isSubmitting={isDeleteLoading}
|
||||
isOpen={isOpen}
|
||||
title="Delete view"
|
||||
content={
|
||||
<>
|
||||
Are you sure you want to delete view-{" "}
|
||||
<span className="break-words font-medium text-custom-text-100">{data?.name}</span>? All of the data related to
|
||||
the view will be permanently removed. This action cannot be undone.
|
||||
</>
|
||||
}
|
||||
title={t("workspace_views.delete_view.title")}
|
||||
content={<>{t("workspace_views.delete_view.content")}</>}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue