import { Component, For } from 'solid-js'; import { peekCachedSignal } from '../../workers/cached-signals'; import { RteViewer } from '../rte'; import Tree from '../tree'; import { WptViewer } from '../wpt'; import GpxIcon from './GpxIcon'; interface Props { gpxId: string; restrictToHierarchy?: any; } const GpxViewer: Component = ({ gpxId, restrictToHierarchy }) => { const gpx = peekCachedSignal({ id: gpxId, method: 'getGpx' }); console.log({ caller: 'GpxViewer', gpxId, restrictToHierarchy, gpx: gpx() }); const title = () => { return gpx().metadata.name; }; return ( {title()} } content={undefined} subTree={ key.startsWith('gpx/') )} > {(key: string) => { const child = restrictToHierarchy[key]; if (child.type === 'wpt') { return ; } if (child.type === 'rte') { return ; } return <>; }} } /> ); }; export default GpxViewer;