/** * 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", "Connosieurship", "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}
))}
); }