Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | import { ICharacter } from '@/shared/types/character';
import './CharacterInfo.scss';
const CharacterInfo = ({ character }: { character: ICharacter }) => {
return (
<div className="character-info">
<h3 className="page-title">Character Info</h3>
<ul>
<li>
<strong>Species:</strong> {character.species}
</li>
{character.type && (
<li>
<strong>Type:</strong> {character.type}
</li>
)}
<li>
<strong>Gender:</strong> {character.gender}
</li>
<li>
<strong>Status:</strong> {character.status}
</li>
<li>
<strong>Origin:</strong> {character.origin?.name}
</li>
<li>
<strong>Location:</strong> {character.location?.name}
</li>
</ul>
</div>
);
};
export default CharacterInfo;
|