setAlertOpen(false)}
cancelActionText={t('buttons.cancel')}
message={
Are you sure you want to remove{' '}
{{ character: gridCharacter?.object.name[locale] }}{' '}
from your team?
}
/>
)
}
const searchModal = () => {
if (editable) {
return (
)
}
}
// Methods: Core element rendering
const perpetuity = () => {
if (gridCharacter) {
const classes = classNames({
Perpetuity: true,
Empty: !gridCharacter.perpetuity,
})
return
}
}
const image = () => {
let image = (
)
if (gridCharacter) {
image = (
{image}
)
}
return (
{image}
{editable ? (
) : (
''
)}
)
}
const unitContent = (
<>
{contextMenu()}
{perpetuity()}
{image()}
{gridCharacter && character ? (
) : (
''
)}
{character?.name[locale]}
{searchModal()}
>
)
return unitContent
}
export default CharacterUnit