All files / src/components/molecules/actor actor.tsx

100% Statements 2/2
100% Branches 2/2
100% Functions 1/1
100% Lines 2/2

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    3x 3x                                  
import { ICast } from "@/interfaces";
 
export const Actor = ({ actor }: { actor: ICast }) => {
  return (
    <div className="border shadow-md flex-1 rounded-xl">
      <img
        className="w-full h-[200px] rounded-t-md object-cover"
        src={`${
          actor.profile_path !== null
            ? `https://image.tmdb.org/t/p/w185/${actor.profile_path}`
            : "https://d3uscstcbhvk7k.cloudfront.net/static/images/slider-placeholder-2x.png"
        }`}
      />
      <div className="p-4">
        <span className="block font-bold">{actor.name}</span>
        <span className="w-[130px] block break-words">{actor.character}</span>
      </div>
    </div>
  );
};