/** * Category list in the corner */ import React, { useState, useEffect } from "react"; var categories = [ // tag ID = array offset + 1 "1620s", "painting", "blunt", "National Gallery of Canada", "Art Gallery of Ontario", "Courtauld Institute", "Stankievech", "connsoeurship", "double agent", "forensics", "black box", ]; export default function Legend({ visible, selected, onSelect }) { return (
{selected && (
onSelect(selected)}> {"View all"}
)} {categories.map((category, index) => (
onSelect(index + 1)} > {category}
))}
); }