<Trk> component
This commit is contained in:
1 parent
79fb39100f
commit
54f2ab06d9
6 files changed
+65
-10
No files matched your search
@@ -1,9 +1,9 @@
|
||||
import { Component, createEffect, createResource } from 'solid-js';
|
||||
import { Component, createEffect, createResource, For } from 'solid-js';
|
||||
|
||||
import OlMap from 'ol/Map';
|
||||
|
||||
import dispatch from '../../workers/dispatcher-main';
|
||||
//import Trk from './Trk';
|
||||
import Trk from '../trk';
|
||||
import getUri from '../../lib/ids';
|
||||
|
||||
interface Props {
|
||||
@@ -27,7 +27,15 @@ export const Gpx: Component<Props> = ({ map, gpxId }) => {
|
||||
console.log({ caller: 'Gpx', map: map(), gpxId, gpx: gpx() });
|
||||
});
|
||||
|
||||
return <></>;
|
||||
return (
|
||||
// @ts-ignore
|
||||
<For each={gpx() ? gpx().trk || [] : []}>
|
||||
{(trkId: string) => {
|
||||
console.log({ caller: 'Gpx / loop', trkId });
|
||||
return <Trk map={map} trkId={trkId} />;
|
||||
}}
|
||||
</For>
|
||||
);
|
||||
};
|
||||
|
||||
export default Gpx;
|
||||
Reference in new issue
Block a user