import React from "react"; import { Link } from "react-router-dom"; import type { Map } from "@customTypes/Map"; interface MapProps { map: Map; catNum: number; }; const Map: React.FC = ({ map, catNum }) => { return (
{map.name}
{map.is_disabled ? map.category_portals[0].portal_count : map.category_portals.find( obj => obj.category.id === catNum + 1 )?.portal_count} {map.is_disabled ? map.category_portals[0].portal_count == 1 ? "portal" : "portals" : map.category_portals.find( obj => obj.category.id === catNum + 1 )?.portal_count == 1 ? "portal" : "portals"}
{[1, 2, 3, 4, 5].map((point) => (
))}
); }; export default Map;