setAlertOpen(false)}
+ cancelActionText={t('buttons.cancel')}
+ message={
+
+ Are you sure you want to remove{' '}
+ {{ character: gridCharacter?.object.name[locale] }}{' '}
+ from your team?
+
+ }
+ />
)
}
+ const contextMenu = () => {
+ if (props.editable && gridCharacter && gridCharacter.id) {
+ return (
+ <>
+
+
+ } className="Options" />
+
+
+
+ Modify character
+
+
+ Remove from grid
+
+
+
+
+ {removeAlert()}
+ >
+ )
+ }
+ }
+
+ //
+
const unitContent = (
{contextMenu()}
diff --git a/components/ContextMenuItem/index.tsx b/components/ContextMenuItem/index.tsx
index 15600c52..be1b7ec9 100644
--- a/components/ContextMenuItem/index.tsx
+++ b/components/ContextMenuItem/index.tsx
@@ -4,11 +4,11 @@ import { DropdownMenuItem } from '@radix-ui/react-dropdown-menu'
import './index.scss'
-interface Props
- extends React.DetailedHTMLProps<
- React.DialogHTMLAttributes,
- HTMLDivElement
- > {}
+interface Props {
+ className?: string
+ onSelect?: (event: Event) => void
+ children: React.ReactNode
+}
const ContextMenuItem = React.forwardRef(
function ContextMenu({ children, ...props }, forwardedRef) {
@@ -19,7 +19,11 @@ const ContextMenuItem = React.forwardRef(
props.className
)
- return {children}
+ return (
+
+ {children}
+
+ )
}
)
diff --git a/public/locales/en/common.json b/public/locales/en/common.json
index 0235580d..8229ee58 100644
--- a/public/locales/en/common.json
+++ b/public/locales/en/common.json
@@ -144,8 +144,12 @@
"earring": "Aetherial Mastery",
"awakening": "Awakening"
},
+ "messages": {
+ "remove": "Are you sure you want to remove {{character}} from your team?"
+ },
"buttons": {
- "confirm": "Save character"
+ "confirm": "Save character",
+ "remove": "Remove character"
}
},
"conflict": {
diff --git a/public/locales/ja/common.json b/public/locales/ja/common.json
index 4c3786b2..a1f2044b 100644
--- a/public/locales/ja/common.json
+++ b/public/locales/ja/common.json
@@ -144,8 +144,12 @@
"earring": "エーテリアルプラス",
"awakening": "覚醒"
},
+ "messages": {
+ "remove": "{{character}}を編成から削除しますか?"
+ },
"buttons": {
- "confirm": "キャラクターを変更する"
+ "confirm": "キャラクターを変更する",
+ "remove": "キャラクターを削除する"
}
},
"conflict": {