Creating a <AllGpxes> component.
This commit is contained in:
1 parent
d0bc9422f3
commit
346b9a1186
5 files changed
+43
-1
No files matched your search
@@ -0,0 +1,33 @@
|
||||
import {
|
||||
Component,
|
||||
createEffect,
|
||||
createResource,
|
||||
createSignal,
|
||||
} from 'solid-js';
|
||||
|
||||
import OlMap from 'ol/Map';
|
||||
|
||||
import dispatch from '../../workers/dispatcher-main';
|
||||
// import Gpx from './Gpx';
|
||||
|
||||
interface Props {
|
||||
map: OlMap | null;
|
||||
}
|
||||
|
||||
export const AllGpxes: Component<Props> = ({ map }) => {
|
||||
const [allGpxes] = createResource(
|
||||
async () =>
|
||||
await dispatch({
|
||||
action: 'getAllGpxes',
|
||||
params: {},
|
||||
})
|
||||
);
|
||||
|
||||
createEffect(() => {
|
||||
console.log({ caller: 'AllGpxes', allGpxes: allGpxes() });
|
||||
});
|
||||
|
||||
return <></>;
|
||||
};
|
||||
|
||||
export default AllGpxes;
|
||||
@@ -0,0 +1 @@
|
||||
export { default } from './AllGpxes';
|
||||
Reference in new issue
Block a user