diff --git a/assets/js/hooks/Mapper/components/characters/Characters.tsx b/assets/js/hooks/Mapper/components/characters/Characters.tsx index 833e56b4..3fc6c26c 100644 --- a/assets/js/hooks/Mapper/components/characters/Characters.tsx +++ b/assets/js/hooks/Mapper/components/characters/Characters.tsx @@ -1,13 +1,18 @@ import { emitMapEvent } from '@/hooks/Mapper/events'; -import { isDocked } from '@/hooks/Mapper/helpers/isDocked.ts'; import { useMapRootState } from '@/hooks/Mapper/mapRootProvider'; import { CharacterTypeRaw } from '@/hooks/Mapper/types'; import { Commands, OutCommand } from '@/hooks/Mapper/types/mapHandlers.ts'; import { useAutoAnimate } from '@formkit/auto-animate/react'; import clsx from 'clsx'; -import { PrimeIcons } from 'primereact/api'; import { useCallback } from 'react'; -import classes from './Characters.module.scss'; +import { + TooltipPosition, + WdEveEntityPortrait, + WdEveEntityPortraitSize, + WdTooltipWrapper, +} from '@/hooks/Mapper/components/ui-kit'; +import { WdCharStateWrapper } from '@/hooks/Mapper/components/characters/components/WdCharStateWrapper.tsx'; + interface CharactersProps { data: CharacterTypeRaw[]; } @@ -17,7 +22,7 @@ export const Characters = ({ data }: CharactersProps) => { const { outCommand, - data: { mainCharacterEveId, followingCharacterEveId }, + data: { mainCharacterEveId, followingCharacterEveId, expiredCharacters }, } = useMapRootState(); const handleSelect = useCallback(async (character: CharacterTypeRaw) => { @@ -35,61 +40,48 @@ export const Characters = ({ data }: CharactersProps) => { }); }, []); - const items = data.map(character => ( -
  • handleSelect(character)} - > -
    - {mainCharacterEveId === character.eve_id && ( - - )} + const items = data.map(character => { + const isExpired = expiredCharacters.includes(character.eve_id); - {followingCharacterEveId === character.eve_id && ( - - )} - {isDocked(character.location) &&
    } -
    -
    -
  • - )); + return ( +
  • handleSelect(character)} + > + + + + + +
  • + ); + }); return (