diff --git a/packages/map-interface/CHANGELOG.md b/packages/map-interface/CHANGELOG.md index 3b0c2370..80cfa606 100644 --- a/packages/map-interface/CHANGELOG.md +++ b/packages/map-interface/CHANGELOG.md @@ -4,9 +4,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.5.6] - 2025-08-01 + +- Fossils component just show data, not panel +- Better error handling for components + ## [1.5.5] - 2025-08-01 -- MAcrostrat linked data error handling +- Macrostrat linked data error handling ## [1.5.4] - 2025-07-31 diff --git a/packages/map-interface/package.json b/packages/map-interface/package.json index cf3b59fc..b739df58 100644 --- a/packages/map-interface/package.json +++ b/packages/map-interface/package.json @@ -1,6 +1,6 @@ { "name": "@macrostrat/map-interface", - "version": "1.5.5", + "version": "1.5.6", "description": "Map interface for Macrostrat", "main": "dist/cjs/index.js", "module": "dist/esm/index.js", diff --git a/packages/map-interface/src/location-details/fossil-collections/index.ts b/packages/map-interface/src/location-details/fossil-collections/index.ts index cb162dae..361b73cd 100644 --- a/packages/map-interface/src/location-details/fossil-collections/index.ts +++ b/packages/map-interface/src/location-details/fossil-collections/index.ts @@ -1,5 +1,4 @@ import h from "@macrostrat/hyper"; -import { ExpansionPanel } from "@macrostrat/map-interface"; import PBDBCollections from "./collections"; export function FossilCollections(props) { @@ -8,14 +7,5 @@ export function FossilCollections(props) { if (!data || data.length <= 0) { return null; } - return h( - ExpansionPanel, - { - className: "regional-panel", - title: "Fossil collections", - helpText: "via PBDB", - expanded, - }, - [h(PBDBCollections, { data })], - ); + return h(PBDBCollections, { data }); } diff --git a/packages/map-interface/src/location-details/location-details.stories.ts b/packages/map-interface/src/location-details/location-details.stories.ts index 9343fbd5..b0ccc244 100644 --- a/packages/map-interface/src/location-details/location-details.stories.ts +++ b/packages/map-interface/src/location-details/location-details.stories.ts @@ -26,10 +26,6 @@ export function RegionalStratigraphyExample() { const mapInfo = fetchMapInfo(lng, lat, zoom); const columnInfo = fetchColumnInfo(lng, lat); - if (!mapInfo || !mapInfo.mapData) { - return null; - } - return h(RegionalStratigraphy, { mapInfo, columnInfo, @@ -41,10 +37,6 @@ export function RegionalStratigraphyExample() { export function PhysiographyExample() { const mapInfo = fetchMapInfo(lng, lat, zoom); - if (!mapInfo) { - return null; - } - return h(Physiography, { mapInfo, expanded: true, @@ -54,10 +46,6 @@ export function PhysiographyExample() { export function MacrostratLinkedDataExample() { const mapInfo = fetchMapInfo(lng, lat, zoom); - if (!mapInfo) { - return null; - } - const source = mapInfo && mapInfo?.mapData && mapInfo?.mapData.length ? mapInfo?.mapData[0] @@ -96,9 +84,5 @@ export function xddInfoExample() { export function FossilsExample() { const fossilInfo = fetchFossilInfo(-89.3938453, 43.0735407); - if (!fossilInfo) { - return null; - } - return h(FossilCollections, { data: fossilInfo, expanded: true }); } diff --git a/packages/map-interface/src/location-details/macrostrat-linked.ts b/packages/map-interface/src/location-details/macrostrat-linked.ts index 0d94ec78..70501a31 100644 --- a/packages/map-interface/src/location-details/macrostrat-linked.ts +++ b/packages/map-interface/src/location-details/macrostrat-linked.ts @@ -24,7 +24,7 @@ export function MacrostratLinkedData(props) { expanded = true, } = props; - if (!mapInfo.mapData[0]) return h("div"); + if (!mapInfo.mapData[0]) return null; return h( ExpansionPanel,